Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
74
Task/Character-codes/68000-Assembly/character-codes.68000
Normal file
74
Task/Character-codes/68000-Assembly/character-codes.68000
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
JSR ResetCoords ;RESET TYPING CURSOR
|
||||
|
||||
MOVE.B #'A',D1
|
||||
MOVE.W #25,D2
|
||||
MOVE.B #0,(softCarriageReturn) ;new line takes the cursor to left edge of screen.
|
||||
jsr PrintAllTheCodes
|
||||
|
||||
jsr ResetCoords
|
||||
MOVE.B #8,(Cursor_X)
|
||||
MOVE.B #'a',D1
|
||||
MOVE.W #25,D2
|
||||
MOVE.B #8,(softCarriageReturn)
|
||||
;set the writing cursor to column 3 of the screen
|
||||
;so we don't erase the old output.
|
||||
|
||||
|
||||
jsr PrintAllTheCodes
|
||||
|
||||
|
||||
forever:
|
||||
bra forever
|
||||
|
||||
|
||||
|
||||
PrintAllTheCodes:
|
||||
MOVE.B D1,D0
|
||||
jsr PrintChar ;print the character as-is
|
||||
|
||||
MOVE.B #" ",D0
|
||||
jsr PrintChar
|
||||
MOVE.B #"=",D0
|
||||
jsr PrintChar
|
||||
MOVE.B #" ",D0
|
||||
jsr PrintChar
|
||||
|
||||
MOVE.B D1,D0 ;get ready to print the code
|
||||
|
||||
JSR UnpackNibbles8
|
||||
SWAP D0
|
||||
ADD.B #$30,D0
|
||||
JSR PrintChar
|
||||
|
||||
SWAP D0
|
||||
CMP.B #10,D0
|
||||
BCS noCorrectHex
|
||||
ADD.B #$07,D0
|
||||
noCorrectHex:
|
||||
ADD.B #$30,D0
|
||||
JSR PrintChar
|
||||
|
||||
MOVE.B (softCarriageReturn),D0
|
||||
JSR doNewLine2 ;new line, with D0 as the carraige return point.
|
||||
|
||||
ADDQ.B #1,D1
|
||||
DBRA D2,PrintAllTheCodes
|
||||
rts
|
||||
|
||||
|
||||
UnpackNibbles8:
|
||||
; INPUT: D0 = THE VALUE YOU WISH TO UNPACK.
|
||||
; HIGH NIBBLE IN HIGH WORD OF D0, LOW NIBBLE IN LOW WORD. SWAP D0 TO GET THE OTHER HALF.
|
||||
pushWord D1
|
||||
CLR.W D1
|
||||
MOVE.B D0,D1
|
||||
CLR.L D0
|
||||
MOVE.B D1,D0 ;now D0 = D1 = $000000II, where I = input
|
||||
|
||||
AND.B #$F0,D0 ;chop off bottom nibble
|
||||
LSR.B #4,D0 ;downshift top nibble into bottom nibble of the word
|
||||
SWAP D0 ;store in high word
|
||||
AND.B #$0F,D1 ;chop off bottom nibble
|
||||
MOVE.B D1,D0 ;store in low word
|
||||
popWord D1
|
||||
rts
|
||||
Loading…
Add table
Add a link
Reference in a new issue