Re: A86: Long Text Routine
[Prev][Next][Index][Thread]
Re: A86: Long Text Routine
Are you sure that that wraps correctly? If not, I can post a routine that my
friend wrote that wraps text (if I can get it from him)...
Trey Jazz wrote:
> Kenneth Kassing wrote:
> >
> > I am just learning how to program in assembly (thanks mainly to Matt
> > Johnson's Z80 Programming Tutorial) and I am wondering if there is an
> > easier way to write a whole page of text. It seems to take an awful lot
> > of source to write a page of text on the screen.
> >
> > #include "asm86.h"
> > #include "ti86asm.inc"
> > #include "ti86math.inc"
> > #include "ti86ops.inc"
> > #include "ti86abs.inc"
> >
> > .org _asm_exec_ram
> >
> > call _clrScrn
> > call _runindicoff
> >
> > Text_test:
> > ld hl, $0000 ;stores (0,0) to hl
> > ld b, 30 ;# of chars. to display
> > ld ($0C37C), hl ;stores hl to adress of
> > _penCol
> > ld hl, Open1 ;loads text string
> > call _vputsn ;writes string to screen
> > ld a, ($0C37D)
> > ld hl, $0600
> > ld b, 34
> > ld ($0C37C), hl
> > ld hl, Open2
> > call _vputsn
> > ld a, ($0C37D)
> > ld hl, $0C00
> > ld b, 32
> > ld ($0C37C), hl
> > ld hl, Open3
> > call _vputsn
> > ld a, ($0C37D)
> > ld hl, $1200
> > ld b, 29
> > ld ($0C37C), hl
> > ld hl, Open4
> > call _vputsn
> >
> > ret
> >
> > Open1: .db "Im Wonderin if this is the"
> > .db "only",0
> > Open2: .db "way to write a long page of"
> > .db "writing",0
> > Open3: .db "like this, or if there is a"
> > .db "short",0
> > Open4: .db "cut, useing a shorter source.",0
> >
> > .end
>
> take out all the names of the variables after Open1 and take off the 0s
> except for the last one. then point hl to Open1 and use vputsn
--
Stephen Hicks
mailto:shicks@mindspring.com
UIN:5453914
AIM:Kupopo1
Follow-Ups:
References: