我正在研究DCPU-16的asm,我从一个简单的hello world程序开始。这是:
hwn i
set j, 0
jsr get_display
:init_display
set a, 0
set b, 0x8000
hwi [display_adress]
set i, 0
:write_string
set a, [message + j]
ife a, 0
set pc, end
jsr write_char
set pc, write_string
:write_char
bor a, 0xA000
set [0x8000 + j], a
add j, 1
set pc, pop
:get_display
hwq [display_adress]
add [display_adress], 1
ifn a, 0xf615
set pc, get_display
set pc, pop
:get_keyboard
hwq [keyboard_adress]
add [keyboard_adress], 1
ifn a, 0x7406
set pc, get_keyboard
set pc, pop
:get_clock
hwq [clock_adress]
add [clock_adress], 1
ifn a, 0xb402
set pc, get_clock
set pc, pop
:get_sped
hwq [sped_adress]
add [sped_adress], 1
ifn a, 0xbf3c
set pc, get_sped
set pc, pop
:display_adress dat 0x0000
:keyboard_adress dat 0x0000
:clock_adress dat 0x0000
:sped_adress dat 0x0000
:message dat "Hello World!", 0
:end
程序找到显示器,注册视频RAM并将字符复制到视频RAM存储器中,但屏幕没有任何反应!有人能帮助我吗?