mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-10-31 16:26:51 +00:00 
			
		
		
		
	Add equ explanation
							parent
							
								
									029c0a10da
								
							
						
					
					
						commit
						57d94c6019
					
				| @ -1,4 +1,24 @@ | ||||
| TODO: | ||||
| # equ | ||||
| 
 | ||||
| The `equ` directive allows you to give a name to certain special values. This code: | ||||
| 
 | ||||
|     INT_LEGS equ 0x0001 | ||||
|     LEGS_SET_DIRECTION equ 0x0001 | ||||
|     NORTH equ 0x0000 | ||||
| 
 | ||||
|     MOV A, LEGS_SET_DIRECTION | ||||
|     MOV B, NORTH | ||||
|     HWI INT_LEGS | ||||
| 
 | ||||
| translates to: | ||||
|      | ||||
|     MOV A, 0x0001 | ||||
|     MOV B, 0x0000 | ||||
|     HWI 0x0001 | ||||
| 
 | ||||
| but is much easier to understand. | ||||
| 
 | ||||
| # TODO: | ||||
| labels   | ||||
| equ   | ||||
| dup   | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user