A86: User Fonts


[Prev][Next][Index][Thread]

A86: User Fonts




;-----------------------------------------------------------
; Here's an example of changing the font.  User fonts take
; longer to draw than the system font because the putmap
; routine does a linear search through the font.
;
;                         Dan Eble (eble@cis.ohio-state.edu)
;-----------------------------------------------------------

#INCLUDE "TI86ASM.INC"

.org _asm_exec_ram

        ld a,0          ; set up font pointer (it's 24-bit)
        ld ($D2ED),a
        ld hl,Font
        ld ($D2EE),hl

        set 0,(IY+$23)  ; use user font!

        ld hl,$0303
        ld (_curRow),hl

        ld hl,String
        call _puts
        call _getkey
        ret

String: .db "ABC",0

Font:
.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)