
    .org 0x8000

main:
    ld hl, hello
    call print

again:
    ld b,64
    ld hl,buf
    call 0x0040
    jr c,main

    call print

    jr again

loop:
    jr loop

scan:
    ; Scan for a key
    call 0x0049
    call 0x0033
    jp scan


#include library "libcode"

hello:
    .asciz "Hello world!", 13

buf:
    defs 65

    end main

