80-Bus News

  

September–October 1983, Volume 2, Issue 5











Page 10 of 67











AmoOSt1A

Tabte 1.

Command Mnemonic

Hex Code {se = 1)

Summary

Hex Code Description

Execution {or = 0)

Cycles

16-BIT FIXED-POINT OPERATIONS

SADD SSUB SMUL SMUU Sov

2agea

16-18 Add TOS to NOS. Result to NOS. Pop Stack.

30-32 Subtract TOS from NOS. Result to NOS. Pop Stack, Multiply NOS by TOS. Lower rasult to NOS. Pop Stack. 80-98 Multply NOS by TOS. Upper result to NOS. Pop Stack. 84-94 Divide NOS by TOS. Resuit to NOS. Pop Stack.

3 3 Z38ers

32-BIT FIXED-POINT OPERATIONS.

QVBI2R%

2c 20-22 Add TOS to NOS. Result to NOS. Pop Stack

20 938-40 Subtract TOS trom NOS. Resuit to NOS. Pop Stack. 26 194-219 Mutuply NOS by TOS. Lower result to NOS. Pop Stack. 36 482-218 Multiply NOS by TOS. Upper result 1a NOS Pop Stack. 2F 196-210 Divide NOS by TOS. Result to NOS Pop Stack.

32-BIT FLOATING-POINT PRIMARY OPERATIONS

SaRB

10 54-368 44 70-370 12 146-168 13 184-184

Add TOS to NOS. Result to NOS. Pop Stack. Subtract TOS from NOS. Result to NOS. Pop Stack. Multiply NOS by TOS. Result to NOS Pop Stack Divide NOS by TOS. Result te NOS. Pop Stack.

32-BIT FLOATING-POINT DERIVED OPERATIONS

aACOS

29838852833

782-870 3796-4808

Square Root of TOS. Result to TOS. Sine of TOS. Result to TOS.

3840-4878 4894-5886 6230-7998 6304-8286 4992-6536 4474-7132 4298-6956

Cosine of TOS. Result to TOS.

Tangent of TOS. Result to TOS

inverse Sine of TOS. Result to TOS.

inverse Cosine of TOS. Result to TOS

inverse Tangent of TOS. Result to TOS.

Common Loganthm of TOS. Result to TOS

Natural Logarithm of TOS. Resull to TOS

3794-4878 @ thised to power in TOS. Reauit to TOS

8290-12082 NOS raised to power in TOS. Result to NOS. Pop Stack

ags83ae8se88s8

DATA AND STACK MANIPULATION OPERATIONS

XCHS xcHo XCHF

BQEYRLTARKRESERREBRS

00 4 No Operation. Clear or set SVREQ. 1F 90-214

18 90-336 \ 1D 62-156 1c S8-342 \ 14 22-24 \

Convert TOS from floating point format to fixed pomt format. Convert TOS trom fixed point format te Boating point format.

36 26-28 Change sign of fixed point operand on TOS

18 16-20 7 16 37 =| 17 a

78 10 38 rd 18 42

79 % 39 26 9 26

tA 16

Change sign of floating point operand on TOS.

Push stack. Duplicate NOS in TOS.

Pop stack. Okt NOS becomes new TOS. Old TOS rotates to bottorn

Exchange TOS and NOS

Push floatng pomt constant 2 onto TOS Previous TOS becomes NOS

110

Patch to MBASIC for HSA-88B support 08-10-83

MACRO-80 3.44 09-Dec-8! PAGE 1

«Z80

title Patch to MBASIC for HSA-88B support 08-10-83

+m om tm ew

Py

on

OCcO4 fac 28b7 movrm 28A9 movfr

0080 0081

amd$a amd$c

aes

0000’ O01 OOAB 0003’ 11 C000 0006’ 21 ocodc’ 0009’ ED BO OOOB’ C9

oooc’ ttt:

s PHRERE

O00 C3 COIR C003 C3 C022 C006 C3 C026 co0g c3 CO2A cooc c3 Cco2F COOF C3 C034 coi2 63 C039 co15 C3 COZE co18 C3 C043 coiB c3 C048

cO1E 3E 10 co20 18 2B co22 3B 12 co24 18 27 C026 3B 13 co28 18 23 CO2A 3B 09 co2c F5

co2D 18 22 co2F 3E O01

fpadd: fpmpy: fpdiv:

log:

sqrt

‘Hack’ for HSA-88B review

This code is assembled to a -COM file that is executed before 4@ patched version of MBASIC is run. The ‘front end’ copies the HSA-88B support routines up to OC000h. Mbasic should then be run with the command:

MBASIC /M: &HBFFF to ensure that Mbasic does not use any memory above C000.

System equates equ Oc04h

equ 028bd7h equ 028a9h

Floating point accumulator Routine to Load (HL) to registers Routine to move BCDE to the FAC

tn ene

equ 80h ; AMD data port on HSA-&68B equ 8th ; AMD command port on HSA-885

_QEHEBEEEHEEEHHHOHEER pont Eid tHE Iie stb fete aE

Short routine to move code into high memory

1d ld 1d

be, codelen de,O0c000h

hi, ttt

idir ret

* Rib He BH EE EE * HR KK WEE ©

-phase OcQ00h ; Locate them here

Address of where to patch MBASIC. 258B (ie change 258B to C3 00 CO...) 2707

276F

2604

dp fpadad jp fpmpy ap fpdiv dp log jp sqr dp sin dip cos dp tan ap atn 3p exp

Pe

B9IC 3951 3728

on am ew

Floating point ADD routine

1d a,iOh ; Add command

jr go

ld a,12h

gr go

ld a,13h

ar go

ld a,09

push af

dr gol 3; Only one operand

10


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 10 of 67