A82: Re: A few Questions about 83->82 ASM


[Prev][Index][Thread]

A82: Re: A few Questions about 83->82 ASM




Inside...

Ahmed El-Helw <ahmed@ticalc.org>
   Program Ideas and Upcoming Programs
   the ticalc.org project - http://www.ticalc.org/
_______________________________________
http://hail.icestorm.com/asm/
ICQ: 3350394

----- Original Message -----
From: <Jkhum98@aol.com>
To: <assembly-82@lists.ticalc.org>
Sent: Thursday, December 31, 1998 3:30 PM
Subject: A82: A few Questions about 83->82 ASM


>
>Hey, I'm working on the 82 Port of Yoshi, and I need some help on
conversions
>and stuff from the 83.  Sam, or anyone else who also knows the 83 as well
as
>the 82, I could use some assistance... =)
>
>How do I display the contents of HL in small font...?  I know I can't use
this
>83 code:
> ld hl, (highscore)
> call _setxxxxop2
> call _op2toop1
> call _dispop1a
>but I came across a routine that was in Ahmed's Port Tutorial, which goes
>something like this:
> push de
> push hl
> ld de,string+5
> xor a
> ld (de),a
>Repeat:
> call UNPACK_HL
> add a,'0'
> dec de
> ld (de),a
> ld a,h
> or l
> jr nz,Repeat
> ex de,hl
> ROM_CALL(D_ZM_STR)
> pop hl
> pop de
>but I don't see how that will really work. Where does "string+5" come in,
do I
>have to define that, and what with?

define string as something like TEXT_MEM -- give it 6 bytes i think.

What does UNPACK_HL do? Also, what is
>"add a,'0' " suppose to achieve? =P  I quite don't get it... someone please
>explain this whole process here, or give me another routine... =P
>

What the routine does is put the number in a string so you can how we say in
83 terms "vputs it"... so basically, its putting it into a string [which is
what string is] and thus allows you to put it.

>Also, a few miscellaneous questions... What are the 82 equivalents of
>"_vputmap",

use M_CHARPUT

 "_divHLbyA",

I think that's UNPACK_HL

 "_HTimesL",

use MUL_HL

and the closest routines to the SOS
>library routines for Random Integers and Large Sprites.  For those, I was
>thinking about just pasting the source in from the SOS Libs (with Joe W's
>Permission of course), and that should work, although are there any better
>routines already on the 82?  Thanks a lot... =)

That's what I did a few times - just paste the source, but make sure to
change the addresses, like the graphscreen one from $8e29 to $88b8.
By the way, I think all the equivelents I wrote are all ROM_CALLs but I
haven't done 82 asm in so long that how should i know for sure :)

Hope that helped.  Feel free to ask any more questions.
-Ahmed


> --Jason K.
>