sortof works
[com32] / src / startup.asm
1         bits 32
2         section .text
3
4 %include 'macros.inc'
5
6         extern main
7
8         global startup
9 startup:
10         mov ebx, 0xb8000 + 156
11         mov byte [ebx], '@'
12         mov byte [ebx + 2], '@'
13         mov byte [ebx + 160], '@'
14         mov byte [ebx + 162], '@'
15
16         call main
17
18 .waitkey:
19         in al, 64h
20         test al, 1
21         jz .waitkey
22         in al, 60h
23         ret
24
25 ;       global putchar
26 ;putchar:
27 ;       mov eax, [esp + 4]
28 ;       cmp al, 10
29 ;       jnz .nonl
30 ;       push eax
31 ;       mov al, 13
32 ;       SER_PUTCHAR
33 ;       pop eax
34 ;.nonl: SER_PUTCHAR
35 ;       ret
36
37         section .data
38         global boot_mem_map_size
39         global boot_mem_map
40         align 4
41 boot_mem_map_size dd 0
42 boot_mem_map times 128 db 0
43
44 ; vi:set ts=8 sts=8 sw=8 ft=nasm: