summaryrefslogtreecommitdiff
path: root/Source/Applications/Demos/lib-melonasm.asm
blob: 0845770d88cd0f1d67dee7acc97b2da48c903bd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[bits 32]

%ifidn __OUTPUT_FORMAT__, bin
; create a MelonBinary output

%define MEM_ORIGIN 0x10000000

dd 0xFEEDBEEF		; magic number ^^
dd end - start
dd MEM_ORIGIN

; the ($-$$) permits not taking into account the header above
[org MEM_ORIGIN - ($-$$)]

%elifidn __OUTPUT_FORMAT__, elf
; create an elf object

[global start]

%endif

%define SC_PUTCH 0xFFFFFF01
%define SC_SLEEP 0xFFFFFF02
%define SC_WHEX 0xFFFFFF03