mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-10-31 16:26:51 +00:00 
			
		
		
		
	organizing examples
							parent
							
								
									5cc91f9a64
								
							
						
					
					
						commit
						7349354394
					
				| @ -80,11 +80,9 @@ y_is_positive: | |||||||
|     RET 2               ; Return and POP our 2 arguments |     RET 2               ; Return and POP our 2 arguments | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | ### Constants by hackersoup with help from [contributors](https://github.com/simon987/Much-Assembly-Required/wiki/Assembly-program-examples/_history) | ||||||
| <details> | <details> | ||||||
| <summary> | <summary> | ||||||
| Constants by hackersoup with help from  |  | ||||||
| <a href="https://github.com/simon987/Much-Assembly-Required/wiki/Assembly-program-examples/_history">contributors</a> |  | ||||||
| <br> |  | ||||||
| Insert this code before the new code you write for MuchAssemblyRequired, and use a text editor like VSCode, Notepad++, Sublime, etc. for auto-complete. | Insert this code before the new code you write for MuchAssemblyRequired, and use a text editor like VSCode, Notepad++, Sublime, etc. for auto-complete. | ||||||
| </summary> | </summary> | ||||||
| 
 | 
 | ||||||
| @ -257,8 +255,10 @@ FLOPPY_WRITE_SECTOR equ 3 ; Cost: 1kJ | |||||||
| ``` | ``` | ||||||
| </details> | </details> | ||||||
| 
 | 
 | ||||||
| example usage using these constants | #### Example | ||||||
| ```assembly | ```assembly | ||||||
|  | ; paste constants definitions here | ||||||
|  | ; the rest of your code goes like | ||||||
| .text | .text | ||||||
|     CALL print_battery |     CALL print_battery | ||||||
| 
 | 
 | ||||||
| @ -275,7 +275,7 @@ print_battery: | |||||||
|                         ; is stored in B register now |                         ; is stored in B register now | ||||||
| 
 | 
 | ||||||
|     MOV A, HOLO_DISPLAY_HEX ; HOLO_DISPLAY_HEX == BATTERY_POLL == 1 |     MOV A, HOLO_DISPLAY_HEX ; HOLO_DISPLAY_HEX == BATTERY_POLL == 1 | ||||||
|                             ; makes this redundant, but you get the idea |                             ; makes this redundant, but you get the idea. | ||||||
|     HWI HWID_HOLO           ; value in B register is displayed on your bot |     HWI HWID_HOLO           ; value in B register is displayed on your bot | ||||||
| 
 | 
 | ||||||
|     POP B |     POP B | ||||||
| @ -283,7 +283,7 @@ print_battery: | |||||||
|     RET |     RET | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Dump memory to disk | ### Dump memory to disk | ||||||
| ```assembly | ```assembly | ||||||
| HWID_FLOPPY   equ 0xB | HWID_FLOPPY   equ 0xB | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user