A86: Re: Hello, I'm new at this


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

A86: Re: Hello, I'm new at this




VAT:
http://www.eden.rutgers.edu/~assets/t9.html
http://members.tripod.com/~jaymzroo/lessons/Less3.txt

OPs:  (From the Assembly Studio 86 help file)

The OP Registers

The OP registers are not really registers, but are a block of memory that is
used to store data, such as floating point values, to pass as arguments to
system routines that operate on such values, and to retrieve the value
returned by them. They are most often used with the math routines
, but are also used to store variable names for user variable manipulation
routines.

There are six OP registers, named OP1 through OP6. Each is 11 bytes long,
and if used to store a floating-point value, has the following format:

The first byte (_OP1) is the sign byte, which is either $00, $01, $80, or
$81.
The bits are composed as follows:

Bit 0 = 0 if real, 1 if complex
Bits 1-6 = 0
Bit 7 = 0 if positive, 1 if negative

Complex numbers are stored in two OP registers, with the real portion in one
register and the imaginary portion in the following register.

The next two bytes are the exponent bytes (_OP1EXPM and _OP1EXPL). The
exponent is calculated by subtracting $FC00 from this word (don't forget to
store the least significant byte first). This indicates how many places to
move the decimal point.

The next 7 bytes are the mantissa (starting at _OP1M) in BCD format, a
sequence of 14 digits.

The last byte (_OP1EXT) is an extra byte that is not used.


Example:

ld hl,FPNum1
 call _MOV10TOOP1
 ret


FPNum1: ; 3.1415926535900e+00 = pi
 .db $00, $00, $FC, $31, $41, $59, $26, $53, $59, $00
FPNum2: ; 1.2000000000000e+02 = 120
 .db $00, $02, $FC, $12, $00, $00, $00, $00, $00, $00
FPNum3: ;-3.6512000000000e-04 = -.00036512
 .db $80, $FC, $FB, $36, $51, $20, $00, $00, $00, $00


>
> I have a basic understanding of the structure of the Z80 and stuff, and
how to
> use registers to perform various tasks, but the thing that baffles me is
the
> VAT and variables and those OP1 things.  Can someone explain to me in
simple
> terms how this works?
>
>



References: