projects
/
ld45_start_nothing
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ce5e5add52e15ec55d0857b84430f3874a69a321
[ld45_start_nothing]
/
src
/
main.asm
1
; vi:filetype=nasm ts=8 sts=8 sw=8:
2
bits 32
3
%include "gfx.inc"
4
%include "keyb.inc"
5
%include "intr.inc"
6
%include "dbglog.inc"
7
8
; this is placed at the beginning of our binary at 1mb (see game.ld)
9
; and it's what gets executed directly by the boot loader
10
section .startup
11
jmp main
12
13
; start of main
14
section .text
15
main:
16
call init_intr
17
call kb_init
18
call init_gfx
19
20
dbglog `hello\n`
21
22
sti
23
main_loop:
24
call update
25
26
call clear
27
28
push dword 0
29
push dword [ship_y]
30
push dword [ship_x]
31
push dword FRAMEBUF_ADDR
32
call sprsheet
33
add esp, 16
34
35
call wait_vsync
36
call swap_buffers
37
jmp main_loop
38
39
update:
40
ret
41
42
section .data
43
align 4
44
ship_x: dd 160
45
ship_y: dd 100