A86: More Font Info
[Prev][Next][Index][Thread]
A86: More Font Info
; Here's another example of changing fonts.
; This one shows how to change the proportional
; font.
#INCLUDE "TI86ASM.INC"
.org _asm_exec_ram
ld a,0 ; set up font pointer
ld ($D2ED),a ; for fixed font
ld hl,BigFont
ld ($D2EE),hl
ld a,0 ; set up font pointer
ld ($D2F0),a ; for proportional font
ld hl,SmallFont
ld ($D2F1),hl
set 0,(IY+$23) ; use user font!
ld hl,$0303
ld (_curRow),hl
ld hl,String
call _puts
ld hl,$0000
ld (_penCol),hl
ld hl,String
call _vputs
call _getkey
res 0,(IY+$23) ; stop using user font
ret
String: .db "ABCD",0
SmallFont:
.db $64 ; magic number
.db $03 ; # of characters in font
.db 'A'
.db 5 ; width of character
.db 00000b
.db 01100b
.db 10010b
.db 11110b
.db 10010b
.db 10010b
.db 'B'
.db 5
.db 00000b
.db 11100b
.db 10010b
.db 11100b
.db 10010b
.db 11100b
.db 'C'
.db 5
.db 00000b
.db 01100b
.db 10010b
.db 10000b
.db 10010b
.db 01100b
BigFont:
.db $6F ; magic number
.db $03 ; # of characters in font
.db 'A'
.db 01100b
.db 11010b
.db 11001b
.db 11111b
.db 11001b
.db 11001b
.db 11001b
.db 'B'
.db 11100b
.db 11010b
.db 11001b
.db 11111b
.db 11001b
.db 11001b
.db 11110b
.db 'C'
.db 01100b
.db 11010b
.db 11001b
.db 11000b
.db 11000b
.db 11001b
.db 01110b
.end
--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
(http://www.cis.ohio-state.edu/~eble)
Follow-Ups: