2015-10-07 11:45:07 +00:00
|
|
|
.name OS
|
|
|
|
.author "Felix Queißner"
|
|
|
|
.descr "The main file of the operating system"
|
|
|
|
|
2015-10-08 16:24:39 +00:00
|
|
|
.export main
|
|
|
|
.export irq
|
|
|
|
|
2015-10-07 22:29:11 +00:00
|
|
|
; PUB main()
|
2015-10-07 11:45:07 +00:00
|
|
|
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:
|
2015-10-07 22:29:11 +00:00
|
|
|
; Our OS should not go into shutdown mode...
|
2015-10-07 19:27:38 +00:00
|
|
|
jmp _end
|
|
|
|
ret
|
|
|
|
|
2015-10-07 22:29:11 +00:00
|
|
|
; PUB irq( id : INT32, data : CPUSTATE )
|
2015-10-07 19:27:38 +00:00
|
|
|
irq:
|
2015-10-07 22:35:57 +00:00
|
|
|
pusht "Hello IRQ "
|
2015-10-07 19:27:38 +00:00
|
|
|
load -1
|
2015-10-07 22:35:57 +00:00
|
|
|
pusht ", EAX="
|
2015-10-07 19:27:38 +00:00
|
|
|
load -2
|
2015-10-07 22:29:11 +00:00
|
|
|
readfld eax
|
2015-10-07 19:27:38 +00:00
|
|
|
pusht "\n"
|
|
|
|
calln print 5
|
|
|
|
|
2015-10-07 11:45:07 +00:00
|
|
|
ret
|