home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d183
/
pcq
/
runtime
/
case.asm
next >
Wrap
Assembly Source File
|
1989-02-25
|
488b
|
28 lines
SECTION CASE
* Case.asm (of PCQ Pascal runtime library)
* Copyright (c) 1989 Patrick Quaid
* This routine moves handles the case jump table. It expects
* the case expression to be in d0, and the address of the
* table in a0. It also requires a properly built table-
* there is no provision for stopping, except for the default
* case.
XDEF _p%case
_p%case
1$ tst.l (a0)
beq.s 2$
cmp.l 4(a0),d0
beq.s 3$
addq.l #8,a0
bra 1$
2$ addq.l #4,a0
3$ move.l (a0),a0
jmp (a0)
END