summaryrefslogtreecommitdiffstats
path: root/sources/helloworld.asm
blob: a98d0f1729cc000abcac57e7ca251f265e87f8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "kernel.inc"
    ; Program header, safe to ignore
    .db "KEXC"
    .db KEXC_ENTRY_POINT
    .dw start
    .db KEXC_STACK_SIZE
    .dw 100
    .db KEXC_HEADER_END
    ; End of program header
hello_world_message:
    .db "Hello, world!", 0 ; <--- Try changing this string
start:
    ; Get a lock on some hardware
    pcall(getLcdLock)

    ; Allocate and clear a display buffer
    pcall(allocScreenBuffer)
    pcall(clearBuffer)

    ; Draw "Hello, world!"
    ld de, 0x0000
    kld(hl, hello_world_message)
    pcall(drawStr)

    ; Copy buffer to display
    pcall(fastCopy)
    jr $ ; hang