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


[Next][Index][Thread]

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




  INSIDE


>>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 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
>> 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.



Ok, quite simply something like this this:
 ld hl,256*57+42
 ld (pencol),hl
 ld a,(keys)
 call _setxxop1
 ld a,2
 call _dispop1a
 
Becomes this:
 ld de,256*57+42
 ld (CURSOR_X),de
 ld a,(keys)
 ld l,a
 ld h,0
 ld b,1
 call DM_HL_DECI

  DM_HL_DECI is the name of the routine you mentioned. Hope that helps.

>>What does UNPACK_HL do?

 I think it divides HL by 10.

> Also, what is
>>"add a,'0' " suppose to achieve?

   I think it means if a number is zero, it will display a zero.


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

>use M_CHARPUT

   Yes, but be sure to use ROM_CALL(M_CHARPUT)


>> "_divHLbyA",
>.I think that's UNPACK_HL

   no, UNPACK_HL divides HL by 10, _divHLbyA divides HL by A. The 
correct equate is: "call $00A3"

>> "_HTimesL",

>use MUL_HL

  Unfortunately, that is not defined in ti82.h or crash82.inc. Use:
"ROM_CALL($1F18-$1A)".




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