From a1aa24f2e89a54992c605c4415c788fc2d3664cb Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Mon, 19 Nov 2018 13:58:16 -0500 Subject: [PATCH] started msx1 --- presets/msx/helloworld.asm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 presets/msx/helloworld.asm diff --git a/presets/msx/helloworld.asm b/presets/msx/helloworld.asm new file mode 100644 index 00000000..bf641e8f --- /dev/null +++ b/presets/msx/helloworld.asm @@ -0,0 +1,36 @@ + +; Hello World example + +; ROM routine for character output +CHPUT: equ $00A2 + +; waste space @ 0x0000 - 0x3fff + org 0x0000 + db 0 + ds 0x3fff + +; MSX cartridge header @ 0x4000 - 0x400f + dw 0x4241 + dw Init + dw Init + dw 0 + dw 0 + dw 0 + dw 0 + dw 0 + +; initialize and print message +Init: + ld hl, msg + call puts + jp Init ; loop forever +puts: ; print 0-terminated string in HL + ld a,(hl) + or a + ret z + call CHPUT ; displays one character in A + inc hl + jr puts + +; ASCII message + CR LF +msg: defm "Hello, world!",13,10,0