Skip to content

Instantly share code, notes, and snippets.

@MaxLeiter
Created October 21, 2018 14:15
Show Gist options
  • Save MaxLeiter/189cd19df71e9016dadce93a376a2e52 to your computer and use it in GitHub Desktop.
Save MaxLeiter/189cd19df71e9016dadce93a376a2e52 to your computer and use it in GitHub Desktop.
;-------------------------------------------------------
; File Created by KCC : free open source ANSI-C Compiler
; Version 3.4.1 #9072 (Mac OS X x86_64)
;-------------------------------------------------------
.globl _main
.globl _get_lcd_lock
.globl _draw_string
.globl _screen_draw
.globl _screen_clear
.globl _screen_allocate
.area _RSEG (ABS)
.org 0x0000
.area _CODE
.map main.c, 6, "void main() {"
_main::
.map main.c, 8, "get_lcd_lock();"
call _get_lcd_lock
.map main.c, 9, "screen = screen_allocate();"
call _screen_allocate
.map main.c, 10, "screen_clear(screen);"
push hl
push hl
call _screen_clear
pop af
pop hl
.map main.c, 11, "draw_string(screen, 0, 0, "Hello world!");"
ld bc, #___str_0+0
push hl
push bc
xor a, a
push af
inc sp
xor a, a
push af
inc sp
push hl
call _draw_string
ld hl, #6
add hl, sp
ld sp, hl
pop hl
.map main.c, 12, "screen_draw(screen);"
push hl
call _screen_draw
pop af
.map main.c, 13, "while (1);"
00102$:
jp 00102$
.map main.c, 14, "}"
ret
___str_0:
.area _CABS (ABS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment