Detail registers.
This commit is contained in:
		
							parent
							
								
									b5ed4b8f1f
								
							
						
					
					
						commit
						fa09906bcb
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		
							
								
								
									
										14
									
								
								src/cpu.ml
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								src/cpu.ml
									
										
									
									
									
								
							| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
(** http://bgb.bircd.org/pandocs.htm#cpuregistersandflags *)
 | 
					(** http://bgb.bircd.org/pandocs.htm#cpuregistersandflags *)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type registers = {
 | 
					type registers = {
 | 
				
			||||||
  a : char;
 | 
					  a : char; (* accumulator *)
 | 
				
			||||||
  b : char;
 | 
					  b : char;
 | 
				
			||||||
  c : char;
 | 
					  c : char;
 | 
				
			||||||
  d : char;
 | 
					  d : char;
 | 
				
			||||||
| 
						 | 
					@ -9,15 +9,15 @@ type registers = {
 | 
				
			||||||
  h : char;
 | 
					  h : char;
 | 
				
			||||||
  l : char;
 | 
					  l : char;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sp : int;
 | 
					  sp : int; (* stack pointer *)
 | 
				
			||||||
  pc : int;
 | 
					  pc : int; (* program counter *)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type flags = {
 | 
					type flags = {
 | 
				
			||||||
  zf : bool;
 | 
					  z  : bool; (* zero *)
 | 
				
			||||||
  n  : bool;
 | 
					  n  : bool; (* substraction *)
 | 
				
			||||||
  h  : bool;
 | 
					  h  : bool; (* half-carry *)
 | 
				
			||||||
  cy : bool;
 | 
					  cy : bool; (* carry *)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type t = {
 | 
					type t = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue