BASIC-SO

Calling Non-BASIC-SO Subroutines

 

 

 

ASN8B.OY3

:Fl:USRASH.ASH

 

 

 

ISIS-II 8181/8185 "ACRO

ASSEHBLER. Y2.1

USRAS"

PACE

Lce 09J

SEQ

SOURCE STATE"ENT

 

 

1ASSE"BLER ROUTINE TO TEST BASIC USR

3RESULT=ARGA+ARCB+ARCC

4IGNORE OVERFLOW

 

 

 

S

 

NAHE

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

 

7

 

PUBLIC

 

 

 

 

 

 

 

 

 

8

 

CSEC

 

 

 

 

 

 

BBIS

El

 

9

USRAS .. :

POP

H

;RETURN

AOOR

 

BBBI

229BBB

D

IB

 

SHLO

RETADR

;5ET

ASIDE

 

BSB4

21BBBB

 

11

 

LX I

H.8

; SET TCTAL TO 8

BSB?

COICBB

C

12

 

CALL

AODDE

iAOD

ARCC

TO. TOTAL

BIBA

5B

 

13

 

"CY

D.B

i"OVE AOOR o.F ARCB TO DE

IBBB

59

 

14

 

"Cy

E.C

iAOD

ARCB

TO.

To.TAL

BBBC

COICBI

C

15

 

CALL

ADDDE

BBBF

01

 

16

 

PCP

o

; ADDRESS

OF

ARG.A

BBl8

CDICBB

C

17

 

CALL

AODOE

iADD

AReA

TO.

To.TAL

B813

EB

 

18

 

XCHG

 

;TOTAL

IN

DE

 

BB14

El

 

19

 

PCP

H

JADDR

o.F

RESULT

BUS

73

 

2B

 

"CY

PI. E

;LOW

BYTE

OF

RESULT

B81'

23

 

21

 

INX

H

 

 

 

 

 

BB17

72

o

22

 

"CY

H,D

;HI BYTE

OF

RESULT

BU8

2AIBBB

23

 

LHLD

RE"TADR

; RETURN

ADDRESS

BBlB

E9

 

24

 

PCHL

; RETURN

 

 

 

 

 

 

 

 

25

ADD 2 BVTES ADDRESSED BY DE TO HL

 

 

 

 

26

 

 

 

 

27

 

CHANCES A.D,E.H,L

 

 

 

 

 

BIIC

E5

 

28

ROODE:

PUSH

H

;SAVE

TOTAL

 

BII0

EB

 

29

 

XCHG

 

;AODR

IN

L

 

BIlE

5E

 

38

 

"o.Y

E.H

;LOW BYTE TO BE ADDED

BI IF

23

 

31

 

IN X

H

;HI BVTE TO. BE ADDED

B82B

5'

 

32

 

HOV

0,"

8121

El

 

33

 

PCP

H

;OLO

TOTAL

 

B822

19

 

34

 

DAD

o

; ADD

TO

TOTAL

B823

C9

 

3S

 

RET

 

 

 

 

 

 

 

 

 

36

DATA

AREA

 

 

 

 

 

 

 

 

 

37

 

OSEG

 

;SAVED

RETURN ADDRESS

BBBB

88BB

 

38

RETAOR:

OW

B

BBBB

 

C

39

 

END

USRASH

 

 

 

 

 

PUBLIC

SYMBOLS

 

 

 

 

 

 

 

 

 

 

USRASH

C BBBB

 

 

 

 

 

 

 

 

 

 

EXTERNAL SY"BCLS

USER S'/HBOLS

AODDE C BBIC RETAOR 0 BIBB USRAS" C BBBS

ASSE"BLY CO .. PLETE. NO ERRORS

Figure E-2. 8080/8085 Assembly Language Program

E-5

Page 91
Image 91
Intel 9800758-02 manual Figure E-2 /8085 Assembly Language Program