home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
languags
/
fortran
/
palasm.lbr
/
EXAMPLE.PQL
/
EXAMPLE.PAL
Wrap
Text File
|
1985-04-14
|
4KB
|
86 lines
PAL16R6
6-BIT SHIFT REGISTER, PARALLEL IN/OUT
CLK I0 D0 D1 D2 D3 D4 D5 I1 GND
/E RILO Q5 Q4 Q3 Q2 Q1 Q0 LIRO VCC
/Q5 := /I1 * /I0 * /Q5 + ; HOLD Q5
/I1 * I0 * /RILO + ; SHIFT RIGHT
I1 * /I0 * /Q4 + ; SHIFT LEFT
I1 * I0 * /D5 ; LOAD D5
/Q4 := /I1 * /I0 * /Q4 + ; HOLD Q4
/I1 * I0 * /Q5 + ; SHIFT RIGHT
I1 * /I0 * /Q3 + ; SHIFT LEFT
I1 * I0 * /D4 ; LOAD D4
/Q3 := /I1 * /I0 * /Q3 + ; HOLD Q3
/I1 * I0 * /Q4 + ; SHIFT RIGHT
I1 * /I0 * /Q2 + ; SHIFT LEFT
I1 * I0 * /D3 ; LOAD D3
/Q2 := /I1 * /I0 * /Q2 + ; HOLD Q2
/I1 * I0 * /Q3 + ; SHIFT RIGHT
I1 * /I0 * /Q1 + ; SHIFT LEFT
I1 * I0 * /D2 ; LOAD D2
/Q1 := /I1 * /I0 * /Q1 + ; HOLD Q1
/I1 * I0 * /Q2 + ; SHIFT RIGHT
I1 * /I0 * /Q0 + ; SHIFT LEFT
I1 * I0 * /D1 ; LOAD D1
/Q0 := /I1 * /I0 * /Q0 + ; HOLD Q0
/I1 * I0 * /Q1 + ; SHIFT RIGHT
I1 * /I0 * /LIRO + ; SHIFT LEFT
I1 * I0 * /D0 ; LOAD D0
IF(/I1 * I0) /LIRO = /Q0 ; LEFT IN, RIGHT OUT
IF( I1 * /I0) /RILO = /Q5 ; RIGHT IN, LEFT OUT
FUNCTION TABLE:
; ^THIS LINE STARTS THE FUNCTION TBL
I1 I0 D5 D4 D3 D2 D1 D0 CLK /E RILO LIRO Q5 Q4 Q3 Q2 Q1 Q0
; THIS IS THE PIN LIST FOR THE TEST
;
; D IN Q OUT
;INSTR D5 - D0 CLK /E RILO LIRO Q5 - Q0 COMMENTS
------------------------------------------------------------------------
; THIS LINE WITH DASHES IS ABSOLUTELY REQUIRED
HH LLLLLL C L Z Z LLLLLL ; LOAD ZEROES
; THE H'S AND L'S CORRESPOND TO THE PIN-LIST ABOVE,
; X IS DON7T CARE, Z IS HI-Z AND C IS CLOCK
;
LL XXXXXX C L Z Z LLLLLL ; HOLD
HL XXXXXX C L L H LLLLLH ; SHIFT LEFT IN H
HL XXXXXX C L L L LLLLHL ; SHIFT LEFT IN L
HL XXXXXX C L L L LLLHLL ;
HL XXXXXX C L L L LLHLLL ;
HL XXXXXX C L L L LHLLLL ;
HL XXXXXX C L H L HLLLLL ;
HL XXXXXX C L L L LLLLLL ;
LL XXXXXX C H Z Z ZZZZZZ ; TEST HI-Z
HH HHHHHH C L Z Z HHHHHH ; LOAD ONES
LL XXXXXX C L Z Z HHHHHH ; HOLD
LH XXXXXX C L L H LHHHHH ; SHIFT RIGHT IN L
LH XXXXXX C L H H HLHHHH ; SHIFT RIGHT IN H
LH XXXXXX C L H H HHLHHH ; SHIFT RIGHT IN H
LH XXXXXX C L H H HHHLHH ; SHIFT RIGHT IN H
LH XXXXXX C L H H HHHHLH ; SHIFT RIGHT IN H
LH XXXXXX C L H L HHHHHL ; SHIFT RIGHT IN H
LH XXXXXX C L H H HHHHHH ; SHIFT RIGHT IN H
LL XXXXXX C H Z Z ZZZZZZ ; TEST HI-Z
----------------------------------------------------------------------
DESCRIPTION:
This is an example of a 6-bit shift register with
load, hold, shift left & right
The SIMULATE instruction causes the PAL-assembler to check the function
table against the logic equations. An appropriate error message is issued
in case of any differences.
o check the function
table against the logic equati