;**********************************************
;* *
;* BUS.M68 *
;* Displays The Contents of the S-100 Bus *
;* *
;* David F. Pallmann, 30-May-84 *
;* *
;**********************************************
SEARCH SYS
SEARCH SYSSYM
START: PHDR -2,0,PH$REE!PH$REU ;program header
CHECK: MOV SYSTEM,D0 ;D0 contains system status bits
AND #SY$CPA,D0 ;check AM1000 bit
BEQ HEADER ;branch if clear (AM100/L)
TYPECR <? this is an AM1000, it has no bus>
JMP EXIT ;exit
HEADER: TYPECR The bus contains the following:
CRLF ;newline
TYPCPU: TAB ;tab
TTYL CPU ;safe to assume system has a CPU
CRLF ;newline
TYPMEM: TAB ;tab
MOV MEMEND,D1 ;D1 contains amount of memory
DIV D1,#1024. ;divide by 1K
AND #177777,D1 ;mask D1 to low-order word
DCVT 0,OT$TRM ;output D1 in decimal
TTYL MEM ;type: K bytes
CRLF ;newline
BOARDS: LEA A0,IOTABL ;A0 points to I/O address
LEA A1,TXTABL ;A1 points to device description text
LOOP: CTRLC EXIT ;branch on ^C
MOV (A0)+,D0 ;D0 contains I/O address
BEQ EXIT ;branch on zero (end of table)
MOV D0,A2 ;A2 contains I/O address
CMPB @A2,#-1 ;is a board occupying I/O address?
BEQ NEXT ; no
TAB ;tab
TTYL @A1 ;type out device text
CRLF ;newline
NEXT: TSTB (A1)+ ;advance to next
BNE NEXT ; description
BR LOOP ;process next device