Zilog Z16C35 User Manual

Page 296

Advertising
background image

Application Note

Technical Considerations When Implementing LocalTalk Link Access Protocol

14-8

LISTING 4

1306
1307 ;****************************************
1308

;ctc1 timer int handler

1309 ;****************************************

00000509

1310 ctc1int:
1311

;ctc1 is programmed in counter mode.

1312

;external trigger edges is provided by

1313

;/trxc pin at intervals of 4.3 usec.

1314

;bit1 of timflg is set when count is terminated.

00000509 f5

1315

push

af

0000050a c5

1316

push

bc

0000050b e5

1317

push

hl

1318

;** update the timing flag **

0000050c 21Wwww

1319

ld

hl,timflg

0000050f 7e

1320

ld

a,(hl)

;get recent timflg

00000510 cbcf

1321

set

1,a

;bit1=1 after count is over

00000512 77

1322

ld

(hl),a

;update the timflg

00000513 e1

1323

pop

hl

00000514 c1

1324

pop

bc

00000515 f1

1325

pop

af

00000516 fb

1326

ei

00000517 ed4d

1327

reti

1328
1329
1330
1331 ;**********************************
1332

;interrupt vector table for the scc

1333 ;**********************************
1334

;the status of the interrupt source will affect

1335

;the interrupt vector. The interrupt handler’s

1336

;address are set in a block, as below.

00000a00

1337

org

sdlc + 0a00h

00000a00

1338 sccvect:
1339 if

scc_a

00000a00

1340

.block

8

;reserve vector for other ch

1341 endif

00000a08 R000+03e9,

1342

dw

txint

;tx int

00000a0a R000+04c8,

1343

dw

ext_stat

;ext/stat int

00000a0c R000+0433,

1344

dw

recint

;rx char int

00000a0e R000+0454,

1345

dw

spcond

;sp rec cond int

1346
1347 if

not

scc_a

00000a10

1348

.block

8

;reserve vector for other ch

1349 endif
1350

00000a18

1351 temp:

.block

1

1352
1353
1354 ;**********************************
1355

;interrupt vector table for the ctc

1356 ;**********************************

00000ad0

1357 org 0ad0h

00000ad0 R000+04d8,

1358

dw

ctc0int

;reserved for ctc0 int routine

00000ad2

1359 org 0ad2h

00000ad2 R000+0509,

1360

dw

ctc1int

;reserved for ctc1 int routine

1361
1362 ;************************
1363

;receive buffer area

1364 ;************************

Page 290 of 316

UM011002-0808

Advertising