Move examples to libvm source base and add symlink to root directory
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
.section code $0x0 {
|
.section code $0x0 {
|
||||||
main:
|
main:
|
||||||
|
mov %ivt, ivt
|
||||||
|
or %flags, $0b100
|
||||||
mov %r0, $0xDEAD
|
mov %r0, $0xDEAD
|
||||||
shl %r0, $16
|
shl %r0, $16
|
||||||
; move 32 bits at 'beef' to %r01
|
; move 32 bits at 'beef' to %r01
|
||||||
@@ -19,8 +21,25 @@
|
|||||||
jnz end
|
jnz end
|
||||||
mov %status, $1
|
mov %status, $1
|
||||||
end:
|
end:
|
||||||
|
div %r0, $0
|
||||||
halt
|
halt
|
||||||
.export main
|
.export main
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.section iv $0x2800 {
|
||||||
|
dz:
|
||||||
|
mov %status, $255
|
||||||
|
halt
|
||||||
|
|
||||||
|
.export dz
|
||||||
|
}
|
||||||
|
|
||||||
|
.section ivt $0x2000 .. $0x2800 {
|
||||||
|
ivt:
|
||||||
|
.interrupt $1, dz ; Divide by zero
|
||||||
|
|
||||||
|
.export ivt
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
Reference in New Issue
Block a user