gameboy/game/game.asm

23 lines
488 B
NASM
Raw Normal View History

2019-06-18 09:08:14 +00:00
INCLUDE "game/text.asm"
2019-06-14 08:36:52 +00:00
SECTION "Game Loop", ROM0
GameLoop:
2019-06-18 09:08:14 +00:00
.wait
2019-06-14 08:36:52 +00:00
ld a, [rLY] ; Load the current vertical line being rendered
cp 144 ; Check if we're past VBlank (1 to 144 = carry bit set)
2019-06-18 09:08:14 +00:00
jr c, .wait ; Jump back to waitVBlank if rLY is less than 144
ld de, HelloWorldStr
call StartText
.mainloop
; Start our game loop
call DrawActiveText
call WaitVBlank
jr .mainloop
Section "Hello wrold string", ROM0
HelloWorldStr:
db "Hello, Worl'd.!?", 0