mirror of
https://github.com/Russell-S-Harper/COMMON.git
synced 2024-11-28 05:51:09 +00:00
Adding SVD.
This commit is contained in:
parent
13c375b242
commit
2d076b503c
@ -145,7 +145,31 @@ _1 RTS ; done
|
||||
.)
|
||||
|
||||
_SVD .( ; SVD r xxyy 3r yy xx (xxyy) <- Rr - save register directly to address
|
||||
RTS
|
||||
LDY #0 ; set up address in I0
|
||||
LDA (_PC),Y
|
||||
STA _I0
|
||||
INY
|
||||
LDA (_PC),Y
|
||||
STA _I0+1
|
||||
DEY ; transfer four bytes over
|
||||
LDA _R0,X
|
||||
STA (_I0),Y
|
||||
INY
|
||||
LDA _R0+1,X
|
||||
STA (_I0),Y
|
||||
INY
|
||||
LDA _R0+2,X
|
||||
STA (_I0),Y
|
||||
INY
|
||||
LDA _R0+3,X
|
||||
STA (_I0),Y
|
||||
LDA #2 ; update program counter
|
||||
CLC
|
||||
ADC _PCL
|
||||
STA _PCL
|
||||
BCC _1
|
||||
INC _PCH
|
||||
_1 RTS ; done
|
||||
.)
|
||||
|
||||
_PSH .( ; PSH r 4r RS <- Rr - push onto stack
|
||||
|
@ -8,7 +8,8 @@ HDR(DEMO)
|
||||
CMN
|
||||
LDD(R0, PLS_1)
|
||||
LDD(R1, MNS_1)
|
||||
ADD(R2, R0, R1)
|
||||
SVD(R1, SVD_T)
|
||||
LDD(R2, SVD_T)
|
||||
ESC
|
||||
BRK
|
||||
|
||||
@ -27,3 +28,5 @@ _2 EXT(S0)
|
||||
END(FACTORIAL)
|
||||
|
||||
END(DEMO)
|
||||
|
||||
SVD_T .BYTE 0, 0, 0, 0
|
||||
|
Loading…
Reference in New Issue
Block a user