A83: Re: A question (or two) please!


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

A83: Re: A question (or two) please!




To use SOS libraries you need to #include "sos.inc" in your program so that
the lib2/vec0/vector0 stuff works.

Let's say I want a program to display a number between 0 and 9:

 .nolist
 #include "joeti83.inc"
 #include "sos.inc"
 .org $9327
 .list

 ccf
 jr start
 .dw libs-$9327
 .dw description

libs:
 .db "ZLIB",0,0,0,0,lib2,vec0
 .db $FF

description:
 .db "Random",0

start:
 ld b,10
 call vector0
 ld l,a
 ld h,0
 call disphl
 jp getkey

.end
END

-----Original Message-----
From: SethirothL@aol.com <SethirothL@aol.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Tuesday, July 21, 1998 10:45 AM
Subject: A83: A question (or two) please!


>
>Hey, thanks for reading this, I know about a grand total of 2 people
actually
>will:
>
>on to the subject at hand.  I'm a relatively new at ASM but I'm getting the
>gist (jist?), anyone that can help me out please reply.
>
>First, I like SOS, and I want to program for it, but I don't know how to
use
>the stuff in Zlib (i.e. it won't compile).  Let's say I call rand in the
>program, and when I go to compile.. well rand isn't a defined romcall, so
TASM
>gives me a load of bitchin.  So
>what I want to know is how I can call these things in my program.. what inc
>file do I have to have??  Well.. that was fun.. also:  Let's say I wanted
to
>keep track of the players lives in a game I made, or something of the like,
a
>simple 0-255 integer.
>How do I store that in the TI's memory?  I think I know how, but where do I
>store it, 'cuz I don't know all the safe mem locations where I can toss
>variables.. thanks for your help in advance.
>
>+------------------------------------------------------------+
>Cameron Seth Lester
>cslester@unity.ncsu.edu
>SethirothL@aol.com <--- I hate AOL
>+------------------------------------------------------------+
>