Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
59
Task/Nth/68000-Assembly/nth-1.68000
Normal file
59
Task/Nth/68000-Assembly/nth-1.68000
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
Nth:
|
||||
MOVEQ #1,D1
|
||||
.loop:
|
||||
MOVE.L D1,-(SP)
|
||||
MOVE.L D0,-(SP)
|
||||
MOVE.B (2,SP),D0
|
||||
JSR printhex
|
||||
MOVE.B (3,SP),D0
|
||||
JSR printhex
|
||||
MOVE.L (SP)+,D0
|
||||
MOVE.L D0,-(SP)
|
||||
AND.W #$00FF,D0
|
||||
;HANDLE SPECIAL CASES
|
||||
CMP.B #$11,D0
|
||||
BEQ .fourth
|
||||
CMP.B #$12,D0
|
||||
BEQ .fourth
|
||||
CMP.B #$13,D0
|
||||
BEQ .fourth
|
||||
;HANDLE THE REST
|
||||
AND.W #$000F,D0
|
||||
CMP.B #1,D0
|
||||
BEQ .first
|
||||
CMP.B #2,D0
|
||||
BEQ .second
|
||||
CMP.B #3,D0
|
||||
BEQ .third
|
||||
.fourth:
|
||||
LEA th,A3
|
||||
bra .print
|
||||
.third:
|
||||
LEA rd,a3
|
||||
bra .print
|
||||
.second:
|
||||
LEA nd,a3
|
||||
bra .print
|
||||
.first:
|
||||
LEA est,a3
|
||||
.print:
|
||||
JSR PrintString
|
||||
JSR newline
|
||||
MOVE.L (SP)+,d0
|
||||
MOVE.L (SP)+,d1
|
||||
ABCD D1,D0
|
||||
DBRA D7,.loop
|
||||
rts
|
||||
|
||||
th:
|
||||
dc.b "th",255
|
||||
even
|
||||
est:
|
||||
dc.b "st",255
|
||||
even
|
||||
nd:
|
||||
dc.b "nd",255
|
||||
even
|
||||
rd:
|
||||
dc.b "rd",255
|
||||
even
|
||||
13
Task/Nth/68000-Assembly/nth-2.68000
Normal file
13
Task/Nth/68000-Assembly/nth-2.68000
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
MOVE.w #0,D0
|
||||
MOVE.W #25,D7
|
||||
JSR Nth
|
||||
|
||||
MOVE.w #$250,D0 ;since we're working with binary-coded decimal, this number is stored as hex.
|
||||
MOVE.W #15,D7
|
||||
JSR Nth
|
||||
|
||||
MOVE.w #$1000,D0 ;since we're working with binary-coded decimal, this number is stored as hex.
|
||||
MOVE.W #25,D7
|
||||
JSR Nth
|
||||
|
||||
jmp * ;stop the cpu - we're done.
|
||||
Loading…
Add table
Add a link
Reference in a new issue