need a starting point for ARM
Posted: Wed Feb 20, 2008 9:26 pm
Hi
i wanted to try writing a small OS for ARM . how do i go about it?
i wanted to try writing a small OS for ARM . how do i go about it?
The Place to Start for Operating System Developers
http://f.osdev.org/
Code: Select all
; GBA Header and test prog by Dex,Coded with FasmARM.
; c:\fasmarm test.asm test.gba
format binary
org 0 ; code starts at offset 0.
use32 ; use 32-bit code.
b rom_start
NintendoLogo:
db 0,0,0,0,0,0,0,0,0,0 ; Nintendo Logo space(156 bytes).
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0
GameTitle:
db "TEAM DEX4U " ; Game Title (12 bytes).
GameCode:
db "1234" ; Game Code (4 bytes).
MakerCode:
db "_$" ; Maker Code (2 bytes).
FixedValue:
db 0x96 ; Fixed value (1 byte).
MainUnit:
db 0 ; Main unit code (1 byte).
DeviceType:
db 0 ; Device Type (1 byte).
ReservedBytes:
db 0,0,0,0,0,0,0 ; Reserved (7 bytes)
SoftwareVersion:
db 0 ; Software version (1 byte).
ComplementCheck:
db 0 ; Complement check (1 byte).
Reserved2:
db 0,0 ; Reserved (2 bytes).
align 4
;********************************;
; Rom start. ;
;********************************;
rom_start:
mov r0, 0x4000000
mov r1, 0x400
add r1, r1, 3
str r1, [r0]
mov r0, 0x6000000
mov r1, 0xff
mov r2, 0x9600
loop1:
strh r1, [r0], 2
subs r2, r2, 1
bne loop1
LetsLoop:
b LetsLoop
times 20000- ($-0) db 0