started msx1

This commit is contained in:
Steven Hugg 2018-11-19 13:58:16 -05:00
parent 43ac950a52
commit a1aa24f2e8
1 changed files with 36 additions and 0 deletions

View File

@ -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