Created
April 4, 2023 18:25
-
-
Save nihirash/1018436bc9f5953d2c0098590635673e to your computer and use it in GitHub Desktop.
Minimal hello world 24 for Agon Light
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ASSUME ADL=1 | |
| org $40000 | |
| jp _start | |
| align 64 | |
| db "MOS" ; Header | |
| db 00 ; Version | |
| db 01 ; ADL | |
| _start: | |
| ;; Reseting Z80 segment - API will know that we working in ADL | |
| ld a,mb | |
| ;; Saving it to stack | |
| push af | |
| xor a | |
| ld mb, a | |
| call _main | |
| pop af | |
| ;; Restoring Z80 segment | |
| ld mb,a | |
| ld hl,0 | |
| ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include "crt.inc" | |
| _main: | |
| ld hl,hello | |
| ld bc,0 | |
| xor a | |
| rst.lil $18 ;; Looks like prefix is important for restarts | |
| ret | |
| hello: | |
| db "HELLO, WORLD" | |
| db 13, 10 | |
| db 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment