Scc/escc user manual, Assembler, as well as register defini- tions – Zilog Z80230 User Manual

Page 247

Advertising
background image

SCC/ESCC

User Manual

UM010903-0515

Application Notes

240

Table lists a “macro” to enable the Z180 to use the Z80

®

Assembler, as well as register defini-

tions.

;external/status interrupt

service routine

ext_stat:

ld

a,10h

out

(scc_cont),a

;reset ext/stat int

in

a,(scc_cont)

;read stat

and

00100000b

;mask off bits other than /cts

rra

;shift into D0 loc

rra

rra

rra

rra

set

1,a

;set interrupt fla

ld

b,a

;save it

ld

a,38h

out

(scc_cont),a

;reset highest ius

ei

;enable int

ret

;return from int

;initialization data table for scc

;table format - register number, then value for the register

;and ends with 0ffh - since scc doesn’t have

;register 0ffh...

scctab:

db

09h

;select WR9

if

scc_a

db

10000000b

;ch a reset

else

db

01000000b

;ch b reset

endif

db

0eh

;select WR15

db

20h

;only enable /cts int

db

01h

;select WR1

db

00000001b

;enable ext/stat int

db

10h

;reset ext/stat int

db

10h

;twice

db

09h

;select WR9

db

08h

;mie, vect not incl. stat

db

0ffh

;end of table

;interrupt vector table

org

inttest + 100h

sccvect:

dw

ext_stat

.block

100h

;reserve area for stack

top_of_sp:

end

Advertising
This manual is related to the following products: