acme/ACME_Lib/cbm/msbstring.a
marcobaye 21cc635bc8 added library files making use of the new string features:
<cbm/msbstring.a> defines macro to store a string with msb set in last character,
<cbm/multicolor.a> defines macros to "paint" 4-color graphics via strings.


git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@269 4df02467-bbd4-4a76-a152-e7ce94205b78
2020-06-28 22:48:10 +00:00

21 lines
355 B
Plaintext

;ACME 0.97
; macro to store a petscii string with msb set in last byte
!macro msbstring @s {
!ct pet {
@l = len(@s)
!if @l < 1 {
!error "String is empty!"
}
!for @i, 0, @l - 1 {
!if $80 & @s[@i] {
!error "String already contains character(s) with MSB set!"
}
}
!for @i, 0, @l - 2 {
!byte @s[@i]
}
!byte $80 | @s[-1]
}
}