mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-16 01:06:43 +00:00
organizing examples
parent
5cc91f9a64
commit
7349354394
@ -80,11 +80,9 @@ y_is_positive:
|
||||
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>
|
||||
<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.
|
||||
</summary>
|
||||
|
||||
@ -257,8 +255,10 @@ FLOPPY_WRITE_SECTOR equ 3 ; Cost: 1kJ
|
||||
```
|
||||
</details>
|
||||
|
||||
example usage using these constants
|
||||
#### Example
|
||||
```assembly
|
||||
; paste constants definitions here
|
||||
; the rest of your code goes like
|
||||
.text
|
||||
CALL print_battery
|
||||
|
||||
@ -275,7 +275,7 @@ print_battery:
|
||||
; is stored in B register now
|
||||
|
||||
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
|
||||
|
||||
POP B
|
||||
@ -283,7 +283,7 @@ print_battery:
|
||||
RET
|
||||
```
|
||||
|
||||
Dump memory to disk
|
||||
### Dump memory to disk
|
||||
```assembly
|
||||
HWID_FLOPPY equ 0xB
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user