forked from TCShenanigans/symphony_stdlib
Moved new *.asm files into src/
v
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
; Error numbers should be 16 bit ODD numbers, so they can be loaded as immediates
|
||||
; and can be checked with:
|
||||
;
|
||||
; qcall falible_function
|
||||
; jne falible_ok ; Jump no error
|
||||
; ; handle error
|
||||
; falible_ok:
|
||||
; ; Happy path
|
||||
; ; ...
|
||||
; OR
|
||||
; qcall falible_function
|
||||
; je handle_error ; Jump if error
|
||||
; ; Happy path
|
||||
; ; ...
|
||||
; handle_error:
|
||||
; ; handle error
|
||||
|
||||
pub const OK = 0x0000
|
||||
pub const SCREEN_INVALID_MODE = 0x0001
|
||||
pub const SCREEN_INVALID_WIDTH = 0x0003
|
||||
pub const SCREEN_FB_TOO_SMALL = 0x0005
|
||||
|
||||
; Extended error codes, these would require loading a 32 bit value.
|
||||
pub const EXT_OK = 0x00000000
|
||||
Reference in New Issue
Block a user