Disabled interrupt call to isrCommon, currently causes GPF if called from interrupt.
This commit is contained in:
parent
f26aa6bcbd
commit
56cd64ef93
@ -28,6 +28,7 @@ proc idtFlush(){.inline,asmNoStackFrame.} =
|
||||
ret
|
||||
"""
|
||||
|
||||
#[
|
||||
proc isrHandler(registers: Registers){.exportc, codegenDecl: "__attribute__((interrupt)) $# $#$#".} =
|
||||
serial.write("Recieved interrupt handler:")
|
||||
serial.write(registers.int_no)
|
||||
@ -53,6 +54,7 @@ proc isrCommon(){.asmNoStackFrame,exportc.} =
|
||||
add $8, %esp
|
||||
iret
|
||||
"""
|
||||
]#
|
||||
|
||||
macro generateISR(code: static[uint8], isError: static[bool]): typed =
|
||||
result = nnkStmtList.newTree(
|
||||
@ -68,10 +70,6 @@ macro generateISR(code: static[uint8], isError: static[bool]): typed =
|
||||
),
|
||||
newEmptyNode(),
|
||||
nnkStmtList.newTree(
|
||||
nnkAsmStmt.newTree(
|
||||
newEmptyNode(),
|
||||
newLit((if isError: "" else: "push 0\x0A") & "push " & $code & "\x0A")
|
||||
),
|
||||
nnkCall.newTree(
|
||||
nnkDotExpr.newTree(
|
||||
newIdentNode("serial"),
|
||||
@ -93,9 +91,10 @@ macro generateISR(code: static[uint8], isError: static[bool]): typed =
|
||||
),
|
||||
newLit("\x0A")
|
||||
),
|
||||
nnkCall.newTree(
|
||||
newIdentNode("isrCommon")
|
||||
)
|
||||
nnkAsmStmt.newTree(
|
||||
newEmptyNode(),
|
||||
newLit((if isError: "" else: "push 0\x0A") & "push " & $code & "\x0A")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -41,4 +41,5 @@ proc kernelMain() {.exportc: "kernel_main"}=
|
||||
terminalWrite(low(int)+1)
|
||||
terminalWrite("\LMAX_UINT:")
|
||||
terminalWrite(high(uint32))
|
||||
terminalWrite("\L")
|
||||
terminalWrite("\L")
|
||||
asm """int $0x3"""
|
Loading…
Reference in New Issue
Block a user