47 lines
562 B
Text
47 lines
562 B
Text
.name OS
|
|
.author "Felix Queißner"
|
|
.descr "The main file of the operating system"
|
|
|
|
.export main
|
|
.export irq
|
|
|
|
; PUB main()
|
|
main:
|
|
pushi 0
|
|
|
|
pusht "Hello World from Conductance!\n"
|
|
calln print 1
|
|
|
|
_loop:
|
|
load 0
|
|
pushi 5
|
|
comp_less
|
|
jmp_if_not _end
|
|
|
|
load 0
|
|
pushi 1
|
|
add
|
|
store 0
|
|
|
|
pusht "counter: "
|
|
load 0
|
|
pusht "\n"
|
|
calln print 3
|
|
|
|
jmp _loop
|
|
_end:
|
|
; Our OS should not go into shutdown mode...
|
|
jmp _end
|
|
ret
|
|
|
|
; PUB irq( id : INT32, data : CPUSTATE )
|
|
irq:
|
|
pusht "Hello IRQ "
|
|
load -1
|
|
pusht ", EAX="
|
|
load -2
|
|
readfld eax
|
|
pusht "\n"
|
|
calln print 5
|
|
|
|
ret
|