Re: A83: Re: How do you...


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

Re: A83: Re: How do you...




Ok...

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

The format of the library table is:
 - first 8 characters = library file name (use zeros if the name is less
than 8 characters). "ZLIB",0,0,0,0
 - the next byte is the number of the library routine you want to access.
e.g. lib2 would be the random
        routine.
 - the last byte is the number of the vector you want to call in order to
access the library. So if you put
        vec0, when you called vector0 you would get the random routine
(lib2) for this example
- if this is the last routine you want to set up, put an $FF, otherwise
continue with the table.
Note that using lib2 and vec0 is necessary, you can't just put a 2 or
something.

-----Original Message-----
From: Phelan Wolf <gwatford@worldnet.att.net>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Thursday, June 18, 1998 7:21 PM
Subject: Re: A83: Re: How do you...


>
>Inside...
>
>Thanks,
>
>-Phelan 'Amen' Wolf
>Joe Wingbermuehle wrote:
>
>> Libraries, as in, for SOS?
>> hehehe
>> wal sartinly!
>>
>> The beginning of your program looks like:
>>
>> ccf ; or equivalent, could be useful if you changed it to xor a
>> jr z,start ; gotta jump to the start don't we? the "z," part makes it
>> "invisible" until INSTALL is run
>> .dw libs-$9327  ; just a pointer to the libraries minus $9327 (to make
SOS
>> smaller....)
>> .dw description ; a pointer to a description
>>
>> description: .db "This is a description for SOS",0
>> libs: .db "ZLIB",0,0,0,0,lib2,vec0   ; set it up so when vector0 is
called
>> ZLib routine 2 (random)
>>
>
>a little hazy on how this part works, I would be much abliged if you went
in
>more detail!
>
>>                      ; is executed, since the max size of a name is 8
chars,
>> we put in zeros to fill the rest up and
>>                      ; make life easier on SOS.... If I had it to do over
>> again, I would have changed that... too late
>>                      ; now though.
>>  .db $FF ; end of definitions, you can insert more if you want ya know
>>
>> start: ; nobody said the libs/description has to be at the end did they?
>>  ld b,10
>>  call vector0 ; call the random routine ( you could #define vector0 as
rand
>> or something...)
>>  ld h,0
>>  ld l,a
>>  jp disphl ; disply a random number between 0 and 9 and exit
>> ; what a boring program! oh well, just for entertainment (yes, I am quite
>> amused at the moment)
>>
>> -----Original Message-----
>> From: Phelan Wolf <gwatford@worldnet.att.net>
>> To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
>> Date: Thursday, June 18, 1998 4:55 PM
>> Subject: A83: How do you...
>>
>> >
>> >I was wondering if anyone knew how to use libraries?
>> >
>> >-Phelan 'Amen' Wolf
>> >
>
>
>


Follow-Ups: