TempleOSCDV4.05.ISO
This commit is contained in:
1 parent
d1856315e0
commit
6fe38d2d9d
118 files changed
+4559
-5069
No files matched your search
@@ -13,7 +13,7 @@ asm {
|
||||
|
||||
_BEEPS::
|
||||
//You can always clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
|
||||
//See $LK,"REGG_C_CLOBBERED",A="MN:REGG_C_CLOBBERED"$ and $LK,"REGG_C_TEMP_CLOBBERED",A="MN:REGG_C_TEMP_CLOBBERED"$.
|
||||
//See $LK,"REGG_CLOBBERED",A="MN:REGG_CLOBBERED"$ and $LK,"REGG_STK_TEMP",A="MN:REGG_STK_TEMP"$.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
|
||||
|
||||
@@ -19,7 +19,7 @@ JIFFIES_MSG: DU8 "Jiffies:",0;
|
||||
|
||||
_BEEPS2::
|
||||
//You can clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
|
||||
//See $LK,"REGG_C_CLOBBERED",A="MN:REGG_C_CLOBBERED"$ and $LK,"REGG_C_TEMP_CLOBBERED",A="MN:REGG_C_TEMP_CLOBBERED"$.
|
||||
//See $LK,"REGG_CLOBBERED",A="MN:REGG_CLOBBERED"$ and $LK,"REGG_STK_TEMP",A="MN:REGG_STK_TEMP"$.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
|
||||
@@ -34,7 +34,7 @@ _BEEPS2::
|
||||
POP RCX
|
||||
LOOP @@05
|
||||
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
MOV RSI,JIFFIES_MSG
|
||||
CALL PUT_STR
|
||||
POP RSI
|
||||
|
||||
@@ -31,7 +31,7 @@ MY_WORLD_MSG:
|
||||
//My convention is to put an underscore
|
||||
//on C callable asm routines.
|
||||
_HELLO_WORLD::
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
MOV RCX,10
|
||||
@@05: MOV RAX,RCX
|
||||
CALL PUT_HEX_U8
|
||||
|
||||
@@ -8,7 +8,7 @@ asm {
|
||||
_BUZZ_FIZZ::
|
||||
PUSH RBP
|
||||
MOV RBP,RSP //Always set-up stk frame. (Stack Gets Traced)
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RDI
|
||||
MOV RSI,FIZZ_SPAN-RANGE_START%FIZZ_SPAN+1
|
||||
MOV RDI,BUZZ_SPAN-RANGE_START%BUZZ_SPAN+1
|
||||
@@ -35,7 +35,7 @@ _BUZZ_FIZZ::
|
||||
CALL PUT_CHARS
|
||||
POP RAX
|
||||
INC RAX
|
||||
CMP RAX,RANGE_END //Actually only a 32-bit instruction.
|
||||
CMP RAX,RANGE_END //Actually only a 32-bit inst.
|
||||
JBE @@05
|
||||
|
||||
POP RDI
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*When I was a kid with a Commodore 64,
|
||||
the 6502 chip had no multiply instruction
|
||||
the 6502 chip had no multiply inst
|
||||
and this is how we had to do it, except,
|
||||
I used more regs in this example.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ PUT_DEC_U64::
|
||||
//but this function will be nice for ASM callers if it saves all regs.
|
||||
PUSH_C_REGS
|
||||
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$&$LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$&$LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
LEA RSI,-1[RBP] //Load addr of end of buffer.
|
||||
//We picked RSI because of PUT_STR
|
||||
//We'll move bwd
|
||||
|
||||
Reference in new issue
Block a user