Updated Assembly program examples (markdown)

Simon Fortier 2017-12-28 10:57:36 -05:00
parent 9d156b4083
commit ca20590214

@ -234,3 +234,23 @@ FLOPPY_WRITE_SECTOR equ 3 ; Cost: 1kJ
;; Read and write operations are synchronous. Track seeking time is 2ms.* ;; 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 ;; *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
```