mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-10 21:49:27 +00:00
32d1147eec
Previously, we used the default character encoding from the project properties to determine how strings and character constants in the entire source file should be encoded. Now we switch between encodings as needed. The default character encoding is no longer relevant. High ASCII is now an actual encoding, rather than acting like ASCII that sometimes doesn't work. Because we can do high ASCII character operands with "| $80", we don't output a .enc to switch from ASCII to high ASCII unless we need to generate a string. (If we're already in high ASCII mode, the "| $80" isn't required but won't hurt anything.) We now do a scan up front to see if ASCII or high ASCII is needed, and only output the .cdefs for the encodings that are actually used. The only gap in the matrix is high ASCII DCI strings -- the ".shift" pseudo-op rejects text if the string doesn't start with the high bit clear.
74 lines
3.2 KiB
ArmAsm
74 lines
3.2 KiB
ArmAsm
;***************************************
|
||
;* Old school boxed output header. *
|
||
;* Brk *
|
||
;* multiple lines yay. How about a *
|
||
;* hy-phenated word? *
|
||
;* Looonglonglonglonglonglonglonglongl *
|
||
;* onglonglongword. *
|
||
;***************************************
|
||
;* Throw in a line divider. These *
|
||
;* aren't: *
|
||
;* *! *
|
||
;* * *
|
||
;* &XYZ *
|
||
;* *
|
||
;***************************************
|
||
.cpu "6502"
|
||
plataddr = $3000 ;address only in platform file
|
||
|
||
;Short, unboxed comment here!!
|
||
; Two spaces after. More hyp-
|
||
;hens?
|
||
* = $1000
|
||
lda #$01 ;Comment!
|
||
;Comment rulers can be helpful in findin the edges of notes. Comments are hyph-
|
||
;enatingly fun. Like the note, this goes out to 80 columns.
|
||
lda #$02 ;&another comment with &&s!
|
||
;Down to 64 columns this time. Why 64? Why not 64. A rose, by
|
||
;any other name, would break the line at the same place. Or hy-
|
||
;phen split.
|
||
lda #$03
|
||
;Ah, the classic 40-column limitation...
|
||
;brings back memories. Of, you know, h-
|
||
;yphenated things.
|
||
lda #$04
|
||
;Thirty columns. 'cause forty
|
||
;felt like too many. Oh, hyp-
|
||
;henation!
|
||
lda #$05
|
||
;*******************************************************************************
|
||
;* Short box comment, 80 cols. *
|
||
;*******************************************************************************
|
||
lda #$06
|
||
;***************************************************************
|
||
;* *
|
||
;* Choppy *
|
||
;* *
|
||
;* box *
|
||
;* *
|
||
;* comment *
|
||
;* *
|
||
;* 64 cols *
|
||
;* *
|
||
;***************************************************************
|
||
lda #$07
|
||
;*****************************
|
||
;* Some non-ASCII stuff: *
|
||
;* †•<E280A0>␇ *
|
||
;*****************************
|
||
lda #$08
|
||
lda #$09
|
||
lda #$0a
|
||
lda #$0b
|
||
lda #$0c
|
||
lda #$0d
|
||
lda #$0e
|
||
lda #$0f
|
||
bit plataddr ;Pull in plataddr to see the comment on the platform file entry.
|
||
rts
|
||
|
||
bytes .byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f ;Comment at the end of a lengthy bulk hex item might overflow various things, but could be wrapped.
|
||
.byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f
|
||
.byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f
|
||
.byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e,$0f
|