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 *)
 | 
			
		||||
 | 
			
		||||
type registers = {
 | 
			
		||||
  a : char;
 | 
			
		||||
  a : char; (* accumulator *)
 | 
			
		||||
  b : char;
 | 
			
		||||
  c : char;
 | 
			
		||||
  d : char;
 | 
			
		||||
| 
						 | 
				
			
			@ -9,15 +9,15 @@ type registers = {
 | 
			
		|||
  h : char;
 | 
			
		||||
  l : char;
 | 
			
		||||
 | 
			
		||||
  sp : int;
 | 
			
		||||
  pc : int;
 | 
			
		||||
  sp : int; (* stack pointer *)
 | 
			
		||||
  pc : int; (* program counter *)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type flags = {
 | 
			
		||||
  zf : bool;
 | 
			
		||||
  n  : bool;
 | 
			
		||||
  h  : bool;
 | 
			
		||||
  cy : bool;
 | 
			
		||||
  z  : bool; (* zero *)
 | 
			
		||||
  n  : bool; (* substraction *)
 | 
			
		||||
  h  : bool; (* half-carry *)
 | 
			
		||||
  cy : bool; (* carry *)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type t = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue