Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
50
Task/Nested-function/68000-Assembly/nested-function.68000
Normal file
50
Task/Nested-function/68000-Assembly/nested-function.68000
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
;program starts here, after loading palettes etc.
|
||||
MOVE.W #3,D1
|
||||
MOVE.W #'.',D4
|
||||
|
||||
JSR MakeList
|
||||
|
||||
jmp * ;halt
|
||||
|
||||
|
||||
|
||||
MakeList:
|
||||
MOVE.W #1,D0
|
||||
loop_MakeList:
|
||||
MOVE.W D0,-(SP)
|
||||
JSR PrintHex
|
||||
MOVE.B D4,D0 ;load separator into D0
|
||||
JSR PrintChar
|
||||
MOVE.B #' ',D0
|
||||
JSR PrintChar
|
||||
MOVE.W (SP)+,D0
|
||||
JSR MakeItem
|
||||
CMP.W D0,D1
|
||||
BCC loop_MakeList ;back to start
|
||||
RTS
|
||||
|
||||
MakeItem:
|
||||
MOVE.W D0,D2
|
||||
SUBQ.W #1,D2
|
||||
LSL.W #2,D2
|
||||
LEA PointerToText,A0
|
||||
MOVE.L (A0,D2),A3
|
||||
JSR PrintString
|
||||
JSR NewLine
|
||||
ADDQ.W #1,D0
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
PointerToText:
|
||||
DC.L FIRST,SECOND,THIRD
|
||||
|
||||
FIRST:
|
||||
DC.B "FIRST",0
|
||||
EVEN
|
||||
SECOND:
|
||||
DC.B "SECOND",0
|
||||
EVEN
|
||||
THIRD:
|
||||
DC.B "THIRD",0
|
||||
EVEN
|
||||
Loading…
Add table
Add a link
Reference in a new issue