mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-16 09:16:44 +00:00
Updated Assembly program examples (markdown)
parent
9d156b4083
commit
ca20590214
@ -233,4 +233,24 @@ FLOPPY_WRITE_SECTOR equ 3 ; Cost: 1kJ
|
||||
;; 1440 sectors of 512 words. (total 1,474,560 bytes / 737,280 words / 1.44MB)
|
||||
;; Read and write operations are synchronous. Track seeking time is 2ms.*
|
||||
;; *Seek time is added to the total execution time, which is not yet calculated as of v1.3a
|
||||
```
|
||||
|
||||
Dump memory to disk
|
||||
```assembly
|
||||
HWID_FLOPPY equ 0xB
|
||||
|
||||
;**************************************
|
||||
;* dumpMemToDisk()
|
||||
;* Dump entire memory to Floppy Disk
|
||||
dumpMemToDisk:
|
||||
MOV X, 0
|
||||
MOV Y, 0
|
||||
dumpMemToDiskLoop:
|
||||
MOV A, 3 ; WRITE_SECTOR
|
||||
HWI HWID_FLOPPY
|
||||
ADD X, 1
|
||||
ADD Y, 512
|
||||
CMP X, 128
|
||||
JNZ dumpMemToDiskLoop
|
||||
RET
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user