Subversion Repositories Spectranet

[/] [trunk/] [experiments/] [testcallbas.asm] - Diff between revs 45 and 68

Show entire file | Details | Blame | View Log

Rev 45 Rev 68
Line 3... Line 3...
        ld a, 1         ; page in spectranet memory
        ld a, 1         ; page in spectranet memory
        ld bc, 0x80EF
        ld bc, 0x80EF
        out (c), a
        out (c), a
 
 
        ld a, 2         ; chan. 2
        ld a, 2         ; chan. 2
        rst 0x10        ; callbas
        rst CALLBAS
        defw 0x1601     ; routine to call
        defw 0x1601     ; routine to call
        ld hl, STR_hello
        ld hl, STR_kb
.loop
.loop
        ld a, (hl)
        ld a, (hl)
        and a
        and a
        jr z, .halt
        jr z, .kb
        rst 0x10
        rst CALLBAS
        defw 0x0010     ; put char routine
        defw 0x0010     ; put char routine
        inc hl
        inc hl
        jr .loop
        jr .loop
.halt
.kb
        di
        call F_getkey
        halt
        rst CALLBAS     ; print pressed key
STR_hello
        defw 0x0010
        defb "Hello, world.",0
        call F_keyup
 
        jr .kb
 
 
 
STR_kb
 
        defb "Keyboard test\r",0
 
 
 
CALLBAS equ 0x10
 
        include "../rom/ui_input.asm"
 
        include "../rom/zxromcalls.asm"