Re: A86: ASM Converter from 85->86


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

Re: A86: ASM Converter from 85->86



On Sat, 2 Aug 1997, Garcia wrote:

> BTW, does anyone know anything about the 86 VAT functions and/or math (op1)
> functions.  I would appreciate any help.
> 

Well, you asked for it.  Prepare for bombardment by unofficial
information.

rst 20h and rst 10h work pretty much like on the 85, except that rst 10h
returns the variable's address as a 24-bit number stored in AHL.  In order
to translate a 24-bit address to a "real" paged address, use the following
functions (which I cut and paste from a previous message)

>         $462F translates a 24-bit address in AHL to a 16-bit address
>                 in HL and sets the proper RAM page.
>         $4633 translates a 24-bit address in AHL to a 16-bit address
>                 in HL and puts the RAM page number into A
>                 the RAM page is unchanged
>
>         $4637 INC AHL
>         $463B DEC AHL

I've found many of the OP functions.  Here's a cut-and-paste from a file I
use with a disassembler.  None of these are tested.
------------------------------------------
label 4203 _LD_OP4,OP3
label 4207 _LD_OP4,OP1
label 420B _LD_OP4,OP2
label 420F _LD_OP4,(HL)
label 4213 _LD_OP2,OP4
label 4217 _LD_OP3,OP4
label 421B _LD_OP2,OP3
label 421F _LD_OP3,OP1
label 4223 _LD_(DE),OP1
label 4227 _LD_OP2,OP5
label 422B _LD_OP6,OP5
label 422F _LD_OP4,OP5
label 4233 _LD_OP2,OP1
label 4237 _LD_OP2,(HL)
label 423B _LD_OP2,OP6
label 423F _LD_OP1,OP6
label 4243 _LD_OP1,OP4
label 4247 _LD_OP1,OP5
label 424B _LD_OP1,OP3
label 424F _LD_OP5,OP4
label 4253 _LD_OP5,OP3
label 4257 _LD_OP5,OP2
label 425B _LD_OP5,(HL)
label 425F _LD_OP6,OP2
label 4263 _LD_OP6,OP1
label 4267 _LD_OP6,(HL)
label 426B _LD_OP5,OP1
label 426F _LD_OP1,OP2
label 4273 _LD_OP1,(HL)
label 4277 _LDIx0B
label 427B _LDIx0A
label 427F _LDIx09(1)
label 4283 _LDIx09(2)
label 4287 _LDIx08
label 428B _LDIx07(1)
label 428F _LDIx07(2)
label 4293 _LDIx06
label 4297 _LDIx05
label 429B _LDIx04
label 429F _LDIx03
label 42A3 _LDIx02

label 42CB _LD_OP3,OP2
label 42CF _LD_OP3,(HL)
label 42D3 _LD_OP6,OP4

label 42E7 _LD_OP4,1.0
label 42EB _LD_OP3,1.0
label 42EF _LD_OP2,8.0
label 42F3 _LD_(HL),8.0
label 42F7 _LD_OP2,5.0
label 42FB _LD_OP2,4.0
label 42FF _LD_(HL),4.0
label 4303 _LD_OP2,3.0
label 4307 _LD_(HL),3.0
label 430B L430B
label 430F _LD_OP1,1.0
label 4313 _LD_OP1,4.0
label 4317 _LD_OP1,3.0
label 431B _LD_OP3,2.0
label 431F _LD_OP1,2.0
label 4323 _LD_OP2,2.0
label 4327 _LD_(HL),2.0
label 432B L432B
label 432F _LD_OP2,1.0
label 4333 _LD_(HL),1.0
label 4337 _LD_(HL),A	; for this one, A is a BCD number that gets loaded
			; into the first 2 mantissa digits of the floating
			; point number at (hl)
label 4353 _LD_OP4,0.0
label 4357 _LD_OP3,0.0
label 435B _LD_OP2,0.0
label 435F _LD_OP1,0.0
label 4363 _LD_(HL),0.0

---------------------------------------
Here are some useful functions.  They're all tested.

_busyOn         .equ    $4AAD
_busyOff        .equ    $4AB1
CP_HL_DE        .equ    $403C
----------------------------------------

Here are some functions I found just yesterday.  Only _strncmp is tested.

label 494F _SelfTest
label 4953 {L244B}	; I think this does self test without asking
label 4957 _strlen	; HL->string, Return: BC=length
label 495B _strcpy	; HL->source,DE->dest, Return: A=0, HL,DE->'\0'
label 495F _strcat	; HL->source,DE->dest, Return: A=0, HL,DE->'\0'
label 4963 _strncmp	; HL->str1,DE->str2, Return:Flags set; A,B change
label 4967 _Test_Bit_In_Table_CF8B
label 496B _Test_Bit_In_Table_(HL)

For those last two functions, bits 7-3 of register A hold the byte offset
into the table and bits 2-0 hold the bit number to test.

--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
         (http://www.cis.ohio-state.edu/~eble)



References: