Re: A86: Displaying Strings


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

Re: A86: Displaying Strings






>From: Jeanne9005@aol.com
>Date: Sat, 11 Jul 1998 20:02:32 EDT
>To: assembly-86@lists.ticalc.org
>Subject: Re: A86: Displaying Strings
>Reply-To: assembly-86@lists.ticalc.org
>
>
>im pretty new at this....so ...how do i get something displayed in 
asm????
>like i want to have it display variable GH, or display the number 
1....what is
>the syn????
>
Whoops. Accidently sent a unfinished email. Heres the finished.
I keep sending messages. (Dumb Hotmail!)
I'm a nobody in asm programming but I can help you.
Heres a sample of how to do that.

To Put Text In Normal Size:
#include "ti86asm.inc" ; Include our list of ram & rom calls
.org _asm_exec_ram  ; Ram adress at which program stars
    ld a,#          ; Loads # into the 8 bit "a" register
    ld (_curRow),a  ; Loads # that was in "a" to the cursor row
    ld a,#          ; Loads # into the 8 bit "a" register
    ld (_curCol),a  ; Loads # that was in "a" to the cursor column
    ld hl,GH        ; Loads 16 bit "hl" register with the text in "GH"
    call _puts      ; Put String in "hl" at cursor position and 
                    ; advances the cursor
    ret             ; Return from program so it doesn't crash
GH:                 ; Label under which we load into "hl"
.db "Hello World",0 ; Defines the byte in which string is stored
.end                ; Define end of program 
 
To put the text in small size replace:
(_curRow) with (_penRow)
(_curCol) with (_penCol)
_puts with _vputs
Note: This uses pixel #s unlike above with 8 rows and 21 columns

-InFuZeD at Zone TI "Making Basic Programming Worth While"
Check Out BlitZ NT! It Rocks and It will be here soon!
I'd release it tommorow but my brother messed with my work :(
It may be out next Saturday Better then ever.

Check Zone TI for alphas! ; Probably Sunday Night
http://zoneti.home.ml.org
 

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com