URL
https://opencores.org/ocsvn/am9080_cpu_based_on_microcoded_am29xx_bit-slices/am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk
Subversion Repositories am9080_cpu_based_on_microcoded_am29xx_bit-slices
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 2 to Rev 3
- ↔ Reverse comparison
Rev 2 → Rev 3
/am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.ams
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.ams
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.bds
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.bds (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.bds (revision 3)
@@ -0,0 +1,1500 @@
+binary-debuggable-source
+0000 0000 f altmon.asm
+0000 0000 s ;-------------------------------------------------------------------------
+0000 0000 s ; ALTMON.ASM - 1K ROM monitor for the Altair 8800.
+0000 0000 s ;
+0000 0000 s ; This monitor is based on the 2.0C monitor from Vector Graphic. The
+0000 0000 s ; original version has been updated to use Altair 2SIO serial ports
+0000 0000 s ; for I/O and several commands have been added and/or modified.
+0000 0000 s ;
+0000 0000 s ; A typical location for this PROM in an Altair is at F800, though
+0000 0000 s ; it can be assembled at most any address. The stack is typically
+0000 0000 s ; placed at the top of the minimum RAM you expect to have in your
+0000 0000 s ; system.
+0000 0000 s ;
+0000 0000 s ; Version Date Author
+0000 0000 s ; ------- ---------- ---------------------------------------
+0000 0000 s ; 1.0 01/10/2016 Mike Douglas (Original)
+0000 0000 s ;
+0000 0000 s ; 1.1 02/29/2016 Mike Douglas
+0000 0000 s ; Fix bug in DUMP code that caused improper range of bytes
+0000 0000 s ; to display. Also in DUMP, display '.' for all characters
+0000 0000 s ; 7Fh or above.
+0000 0000 s ;
+0000 0000 s ; Initialize 2nd 2SIO port so that loading of Intel HEX
+0000 0000 s ; files works over the 2nd port. Only flush hex file
+0000 0000 s ; input on the console serial port to free up code space
+0000 0000 s ; and because it's not really required for the 2nd port.
+0000 0000 s ;
+0000 0000 s ;-------------------------------------------------------------------------
+0000 0000 s ;
+0000 0000 s ; Following is a summary of changes from the original VG 2.0c monitor:
+0000 0000 s ;
+0000 0000 s ; All commands immediately echo a full command name as soon as the
+0000 0000 s ; first command letter is typed (e.g., typing "M" immediately
+0000 0000 s ; displays "MOVE"). This makes it easier to identify commands
+0000 0000 s ; without a list of commands present.
+0000 0000 s ;
+0000 0000 s ; The ESC key can be pressed to abort input or commands as in
+0000 0000 s ; the later 4.x monitors from VG. The original ctrl-c abort is
+0000 0000 s ; still present as well.
+0000 0000 s ;
+0000 0000 s ; The B (boot) command jumps to the Altair disk boot loader PROM
+0000 0000 s ; at FF00 instead of the North Star boot ROM.
+0000 0000 s ;
+0000 0000 s ; A (ASCII dump) command removed and D (hex dump) updated to display
+0000 0000 s ; both hex and ASCII.
+0000 0000 s ;
+0000 0000 s ; X (exchange) command changed to the E command.
+0000 0000 s ;
+0000 0000 s ; H command added to load Intel hex file via either serial port
+0000 0000 s ; on a 2SIO. The L (load and go from tape) does a hex file load
+0000 0000 s ; as well (all tape commands eliminated).
+0000 0000 s ;
+0000 0000 s ; J treated as jump (i.e., go to) command instead of jump to North
+0000 0000 s ; Star DOS.
+0000 0000 s ;
+0000 0000 s ; K treated as fill memory with "K"onstant instead of jump to zero
+0000 0000 s ; (was the Z command which has been removed).
+0000 0000 s ;
+0000 0000 s ; R command sizes RAM (i.e., runs the N non-destructive memory test)
+0000 0000 s ; Was previously a read from cassette command. All cassette commands
+0000 0000 s ; have been removed.
+0000 0000 s ;
+0000 0000 s ; The Y command (Vector Graphic relocating loader) command has been
+0000 0000 s ; removed.
+0000 0000 s ;
+0000 0000 s ; The T test memory command skips the 256 byte page the stack is on
+0000 0000 s ; to prevent crashing the program. A "." pacifier is displayed
+0000 0000 s ; after each cycle through the memory test range is completed
+0000 0000 s ;
+0000 0000 s ;-------------------------------------------------------------------------
+0000 0000 s ;
+0000 0000 s ; Command Summary:
+0000 0000 s ;
+0000 0000 s ; B jump to Altair disk boot loader (FF00)
+0000 0000 s ; C SSSS FFFF CCCC compare blocks
+0000 0000 s ; D SSSS FFFF dump in hex and ASCII
+0000 0000 s ; E SSSS FFFF DDDD exchange block
+0000 0000 s ; F SSSS FFFF DD DD find two byte sequence
+0000 0000 s ; G SSSS go to and execute
+0000 0000 s ; H P load Intel hex file from 2SIO port 0 or 1
+0000 0000 s ; I PP input from I/O port
+0000 0000 s ; J SSSS go to and execute (G)
+0000 0000 s ; K SSSS FFFF DD fill with "K"onstant
+0000 0000 s ; L P load Intel hex file from 2SIO port 0 or 1
+0000 0000 s ; M SSSS FFFF DDDD move block
+0000 0000 s ; N non destructive memory test (size RAM)
+0000 0000 s ; O PP DD output to port
+0000 0000 s ; P LLLL program memory
+0000 0000 s ; Q SSSS FFFF compute checksum
+0000 0000 s ; R non destructive memory test (size RAM)
+0000 0000 s ; S SSSS FFFF DD search for single byte sequence
+0000 0000 s ; T SSSS FFFF test memory
+0000 0000 s ;
+0000 0000 s ;-------------------------------------------------------------------------
+0000 0000 s ;
+0000 0000 s ; Memory location equates
+0000 0000 s
+0400 0400 s org 00400h ;ROM location
+0400 0400 s
+0400 0400 s SPTR equ 0ffffh ;stack pointer (use 256 byte boundary)
+0400 0400 s SIOPORT equ SPTR-32 ;2SIO port used for hex load
+0400 0400 s BOOT equ 0ff00h ;Altair disk boot loader ROM
+0400 0400 s
+0400 0400 s ; 88-2SIO equates
+0400 0400 s
+0400 0400 s CONS equ 10h ;console status port
+0400 0400 s COND equ 11h ;console data port
+0400 0400 s TBE equ 2 ;transmit buffer entry
+0400 0400 s RDA equ 1 ;receive data available
+0400 0400 s
+0400 0400 s ; Misc Equates
+0400 0400 s
+0400 0400 s CR equ 13 ;ASCII carriage return
+0400 0400 s LF equ 10 ;ASCII line feed
+0400 0400 s CTRLC equ 3 ;ASCII control-c
+0400 0400 s ESC equ 27 ;ASCII ESCAPE
+0400 0400 s
+0400 0400 s ;---------------------------------------------------------
+0400 0400 s ; monit - monitor entry point
+0400 0400 s ;---------------------------------------------------------
+0400 0400 d 3e03
+0400 0400 s monit mvi a,3 ;reset 6850 uart
+0402 0402 d d310
+0402 0402 s out CONS
+0404 0404 d d312
+0404 0404 s out CONS+2 ;2nd 2SIO port as well
+0406 0406 d 3e11
+0406 0406 s mvi a,11h ;8N2
+0408 0408 d d310
+0408 0408 s out CONS
+040a 040a d d312
+040a 040a s out CONS+2 ;2nd 2SIO port as well
+040c 040c s
+040c 040c d 31ffff
+040c 040c s lxi sp,SPTR
+040f 040f d cda507
+040f 040f s call dspMsg ;display welcome banner
+0412 0412 d 0d0a0a414c544d4f4e20312eb1
+0412 0412 s db CR,LF,LF,'ALTMON 1.','1'+80h
+041f 041f s
+041f 041f s ; start - command processing loop
+041f 041f s
+041f 041f d 31ffff
+041f 041f s start lxi sp,SPTR ;re-init stack pointer
+0422 0422 d 211f04
+0422 0422 s lxi h,start ;RET's go back to start
+0425 0425 d e5
+0425 0425 s push h
+0426 0426 s
+0426 0426 d cd6307
+0426 0426 s call crlf ;display '*' prompt after CR/LF
+0429 0429 d 3e2a
+0429 0429 s mvi a,'*'
+042b 042b d cd4807
+042b 042b s call ptcn
+042e 042e s
+042e 042e d cdbc07
+042e 042e s call getCon ;read command from keyboard
+0431 0431 d e65f
+0431 0431 s ani 05FH ;lower case to upper case
+0433 0433 d fe42
+0433 0433 s cpi 'B'
+0435 0435 d d8
+0435 0435 s rc ;too small
+0436 0436 d fe55
+0436 0436 s cpi 'U'
+0438 0438 d d0
+0438 0438 s rnc ;too large
+0439 0439 s
+0439 0439 d 21c004
+0439 0439 s lxi h,cmdTbl+100h-2*'B' ;'B' indexes to start of cmdtbl
+043c 043c d 87
+043c 043c s add a ;2 bytes per entry
+043d 043d d 85
+043d 043d s add l
+043e 043e d 6f
+043e 043e s mov l,a
+043f 043f s
+043f 043f d 5e
+043f 043f s mov e,m ;e=lsb of jump address
+0440 0440 d 23
+0440 0440 s inx h
+0441 0441 d 56
+0441 0441 s mov d,m ;d=high byte of jump address
+0442 0442 d eb
+0442 0442 s xchg
+0443 0443 d e9
+0443 0443 s pchl ;away we go
+0444 0444 s
+0444 0444 s ; Command Table
+0444 0444 s
+0444 0444 d 7604
+0444 0444 s cmdTbl dw doboot ;B jump to Altair disk boot loader
+0446 0446 d cf05
+0446 0446 s dw compr ;C SSSS FFFF CCCC compare blocks
+0448 0448 d f104
+0448 0448 s dw disp ;D SSSS FFFF dump in hex
+044a 044a d 8f05
+044a 044a s dw exchg ;E SSSS FFFF DDDD exchange block
+044c 044c d fb05
+044c 044c s dw srch2 ;F SSSS FFFF DD DD two byte search
+044e 044e d 6a04
+044e 044e s dw exec ;G SSSS go to and execute
+0450 0450 d 7606
+0450 0450 s dw hexLoad ;H P load Intel hex file from port
+0452 0452 d 5c06
+0452 0452 s dw pinpt ;I PP input from I/O port
+0454 0454 d 6a04
+0454 0454 s dw exec ;J SSSS jump to and execute (G)
+0456 0456 d 6905
+0456 0456 s dw fill ;K SSSS FFFF DD fill RAM with "k"onstant
+0458 0458 d 7606
+0458 0458 s dw hexLoad ;L P load Intel hex file from port
+045a 045a d 8405
+045a 045a s dw moveb ;M SSSS FFFF DDDD move block
+045c 045c d b605
+045c 045c s dw ndmt ;N non destructive memory test (RAM size)
+045e 045e d 3f06
+045e 045e s dw poutp ;O PP DD output to port
+0460 0460 d 3205
+0460 0460 s dw pgm ;P LLLL program memory
+0462 0462 d 8004
+0462 0462 s dw chksum ;Q SSSS FFFF compute checksum
+0464 0464 d b605
+0464 0464 s dw ndmt ;R non destructive memory test (RAM size)
+0466 0466 d ef05
+0466 0466 s dw srch1 ;S SSSS FFFF DD search for single byte
+0468 0468 d 9904
+0468 0468 s dw tmem ;T SSSS FFFF test memory
+046a 046a s
+046a 046a s ;--------------------------------------------------------------------------
+046a 046a s ; exec (G or J) - execute the program at the address
+046a 046a s ;--------------------------------------------------------------------------
+046a 046a d cda507
+046a 046a s exec call dspMsg
+046d 046d d 474f54cf
+046d 046d s db 'GOT','O'+80h
+0471 0471 s
+0471 0471 d cd2007
+0471 0471 s call ahex ;read address from keyboard
+0474 0474 d eb
+0474 0474 s xchg
+0475 0475 d e9
+0475 0475 s pchl
+0476 0476 s
+0476 0476 s ;--------------------------------------------------------------------------
+0476 0476 s ; doBoot (B) - boot floppy disk by jumping to DBL PROM at FF00
+0476 0476 s ;--------------------------------------------------------------------------
+0476 0476 d cda507
+0476 0476 s doBoot call dspMsg
+0479 0479 d 424f4fd4
+0479 0479 s db 'BOO','T'+80h
+047d 047d s
+047d 047d d c300ff
+047d 047d s jmp BOOT
+0480 0480 s
+0480 0480 s ;--------------------------------------------------------------------------
+0480 0480 s ; chksum (Q) - compute checksum
+0480 0480 s ;--------------------------------------------------------------------------
+0480 0480 d cda507
+0480 0480 s chksum call dspMsg
+0483 0483 d 435355cd
+0483 0483 s db 'CSU','M'+80h
+0487 0487 s
+0487 0487 d cd1d07
+0487 0487 s call tahex
+048a 048a d 0600
+048a 048a s mvi b,0 ;start checksum = 0
+048c 048c s
+048c 048c d 7e
+048c 048c s csloop mov a,m ;get data from memory
+048d 048d d 80
+048d 048d s add b ;add to checksum
+048e 048e d 47
+048e 048e s mov b,a
+048f 048f d cdea07
+048f 048f s call bmp
+0492 0492 d c28c04
+0492 0492 s jnz csloop ;repeat loop
+0495 0495 s
+0495 0495 d 78
+0495 0495 s mov a,b ;a=checksum
+0496 0496 d c37907
+0496 0496 s jmp pt2 ;print checksum and exit
+0499 0499 s
+0499 0499 s ;--------------------------------------------------------------------------
+0499 0499 s ; tmem (T) - memory test routine
+0499 0499 s ;--------------------------------------------------------------------------
+0499 0499 d cda507
+0499 0499 s tmem call dspMsg
+049c 049c d 544553d4
+049c 049c s db 'TES','T'+80h
+04a0 04a0 s
+04a0 04a0 d cd1d07
+04a0 04a0 s call tahex ;read addresses
+04a3 04a3 d 015a5a
+04a3 04a3 s lxi b,05a5ah ;init b,c
+04a6 04a6 s
+04a6 04a6 d 3e2e
+04a6 04a6 s cycl mvi a,'.' ;display '.' before each cycle
+04a8 04a8 d cd4807
+04a8 04a8 s call ptcn
+04ab 04ab d cde204
+04ab 04ab s call rndm
+04ae 04ae d c5
+04ae 04ae s push b ;keep all registers
+04af 04af d e5
+04af 04af s push h
+04b0 04b0 d d5
+04b0 04b0 s push d
+04b1 04b1 s
+04b1 04b1 d 7c
+04b1 04b1 s tlop mov a,h ;on stack page?
+04b2 04b2 d fefe
+04b2 04b2 s cpi (SPTR shr 8)-1 ;compare to msb of stack
+04b4 04b4 d cabb04
+04b4 04b4 s jz skipWr ;in stack, skip write
+04b7 04b7 d cde204
+04b7 04b7 s call rndm
+04ba 04ba d 70
+04ba 04ba s mov m,b ;write in memory
+04bb 04bb d cdea07
+04bb 04bb s skipWr call bmp
+04be 04be d c2b104
+04be 04be s jnz tlop ;repeat loop
+04c1 04c1 s
+04c1 04c1 d d1
+04c1 04c1 s pop d
+04c2 04c2 d e1
+04c2 04c2 s pop h ;restore original
+04c3 04c3 d c1
+04c3 04c3 s pop b ;values
+04c4 04c4 d e5
+04c4 04c4 s push h
+04c5 04c5 d d5
+04c5 04c5 s push d
+04c6 04c6 s
+04c6 04c6 d 7c
+04c6 04c6 s rlop mov a,h ;on stack page?
+04c7 04c7 d fefe
+04c7 04c7 s cpi (SPTR shr 8)-1 ;compare to msb of stack
+04c9 04c9 d cad404
+04c9 04c9 s jz skipRd ;in stack, skip the read
+04cc 04cc d cde204
+04cc 04cc s call rndm ;generate new sequence
+04cf 04cf d 7e
+04cf 04cf s mov a,m ;read memory
+04d0 04d0 d b8
+04d0 04d0 s cmp b ;compare memory
+04d1 04d1 d c46d07
+04d1 04d1 s cnz err ;call error routine
+04d4 04d4 d cdea07
+04d4 04d4 s skipRd call bmp
+04d7 04d7 d c2c604
+04d7 04d7 s jnz rlop
+04da 04da s
+04da 04da d d1
+04da 04da s pop d
+04db 04db d e1
+04db 04db s pop h
+04dc 04dc d cdc707
+04dc 04dc s call pause
+04df 04df d c3a604
+04df 04df s jmp cycl
+04e2 04e2 s
+04e2 04e2 s ; rndm - this routine generates random numbers
+04e2 04e2 s
+04e2 04e2 d 78
+04e2 04e2 s rndm mov a,b ;look at b
+04e3 04e3 d e6b4
+04e3 04e3 s ani 0b4h ;mask bits
+04e5 04e5 d a7
+04e5 04e5 s ana a ;clear carry
+04e6 04e6 d eaea04
+04e6 04e6 s jpe peve ;jump if even
+04e9 04e9 d 37
+04e9 04e9 s stc
+04ea 04ea d 79
+04ea 04ea s peve mov a,c ;look at c
+04eb 04eb d 17
+04eb 04eb s ral ;rotate carry in
+04ec 04ec d 4f
+04ec 04ec s mov c,a ;restore c
+04ed 04ed d 78
+04ed 04ed s mov a,b ;look at b
+04ee 04ee d 17
+04ee 04ee s ral ;rotate carry in
+04ef 04ef d 47
+04ef 04ef s mov b,a ;restore b
+04f0 04f0 d c9
+04f0 04f0 s ret ;return with new b,c
+04f1 04f1 s
+04f1 04f1 s ;--------------------------------------------------------------------------
+04f1 04f1 s ; disp (D) - display memory contents
+04f1 04f1 s ;--------------------------------------------------------------------------
+04f1 04f1 d cda507
+04f1 04f1 s disp call dspMsg
+04f4 04f4 d 44554dd0
+04f4 04f4 s db 'DUM','P'+80h
+04f8 04f8 s
+04f8 04f8 d cd1d07
+04f8 04f8 s call tahex ;read addresses
+04fb 04fb s
+04fb 04fb d e5
+04fb 04fb s dmpLine push h ;save address at start of line
+04fc 04fc d 0e10
+04fc 04fc s mvi c,16 ;16 locations per line
+04fe 04fe d cd8107
+04fe 04fe s call ptad ;print current address
+0501 0501 s
+0501 0501 s ; dump line in hex
+0501 0501 s
+0501 0501 d 7e
+0501 0501 s dmpHex mov a,m ;a=byte to display
+0502 0502 d cd7907
+0502 0502 s call pt2 ;display it
+0505 0505 d cd4607
+0505 0505 s call spce
+0508 0508 d 23
+0508 0508 s inx h
+0509 0509 d 0d
+0509 0509 s dcr c ;decrement line byte count
+050a 050a d c20105
+050a 050a s jnz dmpHex ;loop until 16 bytes done
+050d 050d s
+050d 050d s ; dump line in ASCII
+050d 050d s
+050d 050d d cd4607
+050d 050d s call spce
+0510 0510 d e1
+0510 0510 s pop h ;hl->start of line
+0511 0511 d 0e10
+0511 0511 s mvi c,16 ;16 locations per line
+0513 0513 s
+0513 0513 d 7e
+0513 0513 s dmpAsc mov a,m ;a=byte to display
+0514 0514 d fe7f
+0514 0514 s cpi 7Fh ;test if >= 7Fh
+0516 0516 d d21e05
+0516 0516 s jnc dspDot ;non printable, show '.'
+0519 0519 s
+0519 0519 d fe20
+0519 0519 s cpi ' ' ;displayable character?
+051b 051b d d22005
+051b 051b s jnc dspAsc ;yes, go display it
+051e 051e s
+051e 051e d 3e2e
+051e 051e s dspDot mvi a,'.' ;display '.' instead
+0520 0520 s
+0520 0520 d cd4807
+0520 0520 s dspAsc call ptcn ;display the character
+0523 0523 d cdea07
+0523 0523 s call bmp ;increment hl, possibly de
+0526 0526 d 0d
+0526 0526 s dcr c ;decrement line byte count
+0527 0527 d c21305
+0527 0527 s jnz dmpAsc ;loop until 16 bytes done
+052a 052a s
+052a 052a d cdea07
+052a 052a s call bmp ;done?
+052d 052d d c8
+052d 052d s rz ;yes
+052e 052e d 2b
+052e 052e s dcx h ;undo extra bump of hl
+052f 052f d c3fb04
+052f 052f s jmp dmpLine ;do another line
+0532 0532 s
+0532 0532 s ;--------------------------------------------------------------------------
+0532 0532 s ; pgm (P) - program memory
+0532 0532 s ;--------------------------------------------------------------------------
+0532 0532 d cda507
+0532 0532 s pgm call dspMsg
+0535 0535 d 5047cd
+0535 0535 s db 'PG','M'+80h
+0538 0538 s
+0538 0538 d cd2007
+0538 0538 s call ahex ;read address
+053b 053b d eb
+053b 053b s xchg
+053c 053c d cd6307
+053c 053c s call crlf
+053f 053f s
+053f 053f d 7e
+053f 053f s pglp mov a,m ;read memory
+0540 0540 d cd7907
+0540 0540 s call pt2 ;print 2 digits
+0543 0543 d 3e2d
+0543 0543 s mvi a,'-' ;load dash
+0545 0545 d cd4807
+0545 0545 s call ptcn ;print dash
+0548 0548 s
+0548 0548 d cdb307
+0548 0548 s crig call rdcn ;get user input
+054b 054b d fe20
+054b 054b s cpi ' ' ;space
+054d 054d d ca6505
+054d 054d s jz con2 ;skip if space
+0550 0550 d fe0d
+0550 0550 s cpi CR ;skip if CR
+0552 0552 d c25b05
+0552 0552 s jnz con1
+0555 0555 d cd6307
+0555 0555 s call crlf ;print CR,LF
+0558 0558 d c34805
+0558 0558 s jmp crig ;back for more
+055b 055b s
+055b 055b d eb
+055b 055b s con1 xchg ;HL->DE
+055c 055c d 210000
+055c 055c s lxi h,0 ;get 16 bit zero
+055f 055f d 0e02
+055f 055f s mvi c,2 ;count 2 digits
+0561 0561 d cd2807
+0561 0561 s call ahexNr ;convert to hex (no read)
+0564 0564 d 73
+0564 0564 s mov m,e
+0565 0565 d 23
+0565 0565 s con2 inx h
+0566 0566 d c33f05
+0566 0566 s jmp pglp
+0569 0569 s
+0569 0569 s ;--------------------------------------------------------------------------
+0569 0569 s ; fill (K) - fill memory with a constant
+0569 0569 s ;--------------------------------------------------------------------------
+0569 0569 d cda507
+0569 0569 s fill call dspMsg
+056c 056c d 46494ccc
+056c 056c s db 'FIL','L'+80h
+0570 0570 s
+0570 0570 d cd1d07
+0570 0570 s call tahex ;read addresses
+0573 0573 d e5
+0573 0573 s push h ;start addr on stack
+0574 0574 d 0e02
+0574 0574 s mvi c,2 ;reading 2 digits
+0576 0576 d cd2207
+0576 0576 s call ahe0 ;input fill byte
+0579 0579 d eb
+0579 0579 s xchg ;byte to write from e to l
+057a 057a d e3
+057a 057a s xthl ;hl=start addr, stack=fill byte
+057b 057b d c1
+057b 057b s pop b ;c=fill byte from stack
+057c 057c s
+057c 057c d 71
+057c 057c s zloop mov m,c ;write into memory
+057d 057d d cdea07
+057d 057d s call bmp ;compare address, increment h
+0580 0580 d c8
+0580 0580 s rz
+0581 0581 d c37c05
+0581 0581 s jmp zloop
+0584 0584 s
+0584 0584 s ;--------------------------------------------------------------------------
+0584 0584 s ; moveb (M) - move a block of memory
+0584 0584 s ; exchg (E) - exhange block of memory
+0584 0584 s ;--------------------------------------------------------------------------
+0584 0584 d cda507
+0584 0584 s moveb call dspMsg
+0587 0587 d 4d4f56c5
+0587 0587 s db 'MOV','E'+80h
+058b 058b d af
+058b 058b s xra a ;a=0 means "move" command
+058c 058c d c39605
+058c 058c s jmp doMove
+058f 058f s
+058f 058f d cda507
+058f 058f s exchg call dspMsg
+0592 0592 d 455843c8
+0592 0592 s db 'EXC','H'+80h
+0596 0596 s ;a returned <> 0 means "exchange" command
+0596 0596 s
+0596 0596 d 47
+0596 0596 s doMove mov b,a ;save move/exchange flag in b
+0597 0597 d cd1d07
+0597 0597 s call tahex ;read addresses
+059a 059a d e5
+059a 059a s push h
+059b 059b d cd2007
+059b 059b s call ahex
+059e 059e d eb
+059e 059e s xchg
+059f 059f d e3
+059f 059f s xthl ;HL->start, DE->end, stack has dest
+05a0 05a0 s
+05a0 05a0 d 4e
+05a0 05a0 s mloop mov c,m ;c=byte from source
+05a1 05a1 d e3
+05a1 05a1 s xthl ;hl->destination
+05a2 05a2 s
+05a2 05a2 d 78
+05a2 05a2 s mov a,b ;move or exchange?
+05a3 05a3 d b7
+05a3 05a3 s ora a
+05a4 05a4 d caab05
+05a4 05a4 s jz nexch ;0 means move only
+05a7 05a7 s
+05a7 05a7 d 7e
+05a7 05a7 s mov a,m ;a=from destination
+05a8 05a8 d e3
+05a8 05a8 s xthl ;hl->source
+05a9 05a9 d 77
+05a9 05a9 s mov m,a ;move destination to source
+05aa 05aa d e3
+05aa 05aa s xthl ;hl->destination
+05ab 05ab s
+05ab 05ab d 71
+05ab 05ab s nexch mov m,c ;move source to destination
+05ac 05ac d 23
+05ac 05ac s inx h ;increment destination
+05ad 05ad d e3
+05ad 05ad s xthl ;hl->source
+05ae 05ae d cdea07
+05ae 05ae s call bmp ;increment source and compare to end
+05b1 05b1 d c2a005
+05b1 05b1 s jnz mloop
+05b4 05b4 s
+05b4 05b4 d e1
+05b4 05b4 s pop h ;remove temp pointer from stack
+05b5 05b5 d c9
+05b5 05b5 s ret ;and exit
+05b6 05b6 s
+05b6 05b6 s ;--------------------------------------------------------------------------
+05b6 05b6 s ; ndmt (N or R) - non destructive memory test (size RAM)
+05b6 05b6 s ;--------------------------------------------------------------------------
+05b6 05b6 d cda507
+05b6 05b6 s ndmt call dspMsg
+05b9 05b9 d 52414d544fd0
+05b9 05b9 s db 'RAMTO','P'+80h
+05bf 05bf s
+05bf 05bf d 21ffff
+05bf 05bf s lxi h,0ffffh ;start at zero
+05c2 05c2 s
+05c2 05c2 d 23
+05c2 05c2 s ndlop inx h
+05c3 05c3 d 7e
+05c3 05c3 s mov a,m ;read from address in hl
+05c4 05c4 d 47
+05c4 05c4 s mov b,a ;save original value in b
+05c5 05c5 d 2f
+05c5 05c5 s cma ;form and write inverted value
+05c6 05c6 d 77
+05c6 05c6 s mov m,a
+05c7 05c7 d be
+05c7 05c7 s cmp m ;read and compare
+05c8 05c8 d 70
+05c8 05c8 s mov m,b ;restore original value
+05c9 05c9 d cac205
+05c9 05c9 s jz ndlop ;keep going if still RAM
+05cc 05cc s
+05cc 05cc d c36d07
+05cc 05cc s jmp err ;display end of RAM
+05cf 05cf s
+05cf 05cf s ;--------------------------------------------------------------------------
+05cf 05cf s ; compr (C) - compare two blocks of memory
+05cf 05cf s ;--------------------------------------------------------------------------
+05cf 05cf d cda507
+05cf 05cf s compr call dspMsg
+05d2 05d2 d 434f4dd0
+05d2 05d2 s db 'COM','P'+80h
+05d6 05d6 s
+05d6 05d6 d cd1d07
+05d6 05d6 s call tahex ;read addresses
+05d9 05d9 d e5
+05d9 05d9 s push h ;source start on stack
+05da 05da d cd2007
+05da 05da s call ahex
+05dd 05dd d eb
+05dd 05dd s xchg ;de=source end, hl=compare start
+05de 05de s
+05de 05de d 7e
+05de 05de s vmlop mov a,m ;a=compare byte
+05df 05df d 23
+05df 05df s inx h
+05e0 05e0 d e3
+05e0 05e0 s xthl ;hl->source byte
+05e1 05e1 d be
+05e1 05e1 s cmp m ;same?
+05e2 05e2 d 46
+05e2 05e2 s mov b,m ;b=source byte
+05e3 05e3 d c46d07
+05e3 05e3 s cnz err ;display the error
+05e6 05e6 d cdea07
+05e6 05e6 s call bmp ;increment pointers
+05e9 05e9 d e3
+05e9 05e9 s xthl ;hl->compare byte
+05ea 05ea d c2de05
+05ea 05ea s jnz vmlop
+05ed 05ed s
+05ed 05ed d e1
+05ed 05ed s pop h ;remove temp pointer from stack
+05ee 05ee d c9
+05ee 05ee s ret ;and exit
+05ef 05ef s
+05ef 05ef s ;--------------------------------------------------------------------------
+05ef 05ef s ; srch1 (S) - search for one byte
+05ef 05ef s ; srch2 (F) - search for two bytes
+05ef 05ef s ;--------------------------------------------------------------------------
+05ef 05ef d cda507
+05ef 05ef s srch1 call dspMsg
+05f2 05f2 d 46494e44b1
+05f2 05f2 s db 'FIND','1'+80h
+05f7 05f7 d af
+05f7 05f7 s xra a ;zero flag means one byte search
+05f8 05f8 d c30306
+05f8 05f8 s jmp doSrch
+05fb 05fb s
+05fb 05fb d cda507
+05fb 05fb s srch2 call dspMsg
+05fe 05fe d 46494e44b2
+05fe 05fe s db 'FIND','2'+80h
+0603 0603 s ;a returned <> 0 means two byte search
+0603 0603 s
+0603 0603 d f5
+0603 0603 s doSrch push psw ;save 1/2 byte flag on stack
+0604 0604 d cd1d07
+0604 0604 s call tahex
+0607 0607 s
+0607 0607 d e5
+0607 0607 s push h ;save h, getting 1st byte to find
+0608 0608 d 0e02
+0608 0608 s mvi c,2 ;reading 2 hex digits
+060a 060a d cd2207
+060a 060a s call ahe0 ;
+060d 060d d eb
+060d 060d s xchg ;h=code, d=f
+060e 060e d 45
+060e 060e s mov b,l ;put code in b
+060f 060f d e1
+060f 060f s pop h ;restore h
+0610 0610 s
+0610 0610 d f1
+0610 0610 s pop psw ;a=one/two byte flag
+0611 0611 d b7
+0611 0611 s ora a ;zero true if one byte search
+0612 0612 d f5
+0612 0612 s push psw
+0613 0613 d ca1f06
+0613 0613 s jz cont
+0616 0616 s
+0616 0616 d e5
+0616 0616 s push h ;save h, getting 2nd byte to find
+0617 0617 d 0e02
+0617 0617 s mvi c,2
+0619 0619 d cd2207
+0619 0619 s call ahe0
+061c 061c d eb
+061c 061c s xchg
+061d 061d d 4d
+061d 061d s mov c,l
+061e 061e d e1
+061e 061e s pop h
+061f 061f s
+061f 061f d 7e
+061f 061f s cont mov a,m ;read memory
+0620 0620 d b8
+0620 0620 s cmp b ;compare to code
+0621 0621 d c23706
+0621 0621 s jnz skp ;skip if no compare
+0624 0624 s
+0624 0624 d f1
+0624 0624 s pop psw ;a=one/two byte flag
+0625 0625 d b7
+0625 0625 s ora a ;zero true if one byte serach
+0626 0626 d f5
+0626 0626 s push psw
+0627 0627 d ca3106
+0627 0627 s jz obcp
+062a 062a s
+062a 062a d 23
+062a 062a s inx h ;two byte search
+062b 062b d 7e
+062b 062b s mov a,m
+062c 062c d 2b
+062c 062c s dcx h
+062d 062d d b9
+062d 062d s cmp c
+062e 062e d c23706
+062e 062e s jnz skp
+0631 0631 s
+0631 0631 d 23
+0631 0631 s obcp inx h
+0632 0632 d 7e
+0632 0632 s mov a,m ;read next byte
+0633 0633 d 2b
+0633 0633 s dcx h ;decr address
+0634 0634 d cd6d07
+0634 0634 s call err ;print data found
+0637 0637 s
+0637 0637 d cdea07
+0637 0637 s skp call bmp ;check if done
+063a 063a d c21f06
+063a 063a s jnz cont ;back for more
+063d 063d d f1
+063d 063d s pop psw ;remove flag saved on stack
+063e 063e d c9
+063e 063e s ret
+063f 063f s
+063f 063f s ;--------------------------------------------------------------------------
+063f 063f s ; poutp (O) - output data to a port
+063f 063f s ;--------------------------------------------------------------------------
+063f 063f d cda507
+063f 063f s poutp call dspMsg
+0642 0642 d 4f55d4
+0642 0642 s db 'OU','T'+80h
+0645 0645 s
+0645 0645 d 0e02
+0645 0645 s mvi c,2
+0647 0647 d cd2207
+0647 0647 s call ahe0 ;port number in e
+064a 064a s
+064a 064a d 0e02
+064a 064a s mvi c,2
+064c 064c d cd2207
+064c 064c s call ahe0 ;port to l, data in e
+064f 064f s
+064f 064f d 55
+064f 064f s mov d,l ;d=port
+0650 0650 d 21cfff
+0650 0650 s lxi h,SPTR-30h ;form OUT nn, RET in memory at h
+0653 0653 d 36c9
+0653 0653 s mvi m,0c9h ;RET opcode
+0655 0655 d 2b
+0655 0655 s dcx h
+0656 0656 d 72
+0656 0656 s mov m,d ;output port for OUT instruction
+0657 0657 d 2b
+0657 0657 s dcx h
+0658 0658 d 36d3
+0658 0658 s mvi m,0D3H ;OUT opcode
+065a 065a d 7b
+065a 065a s mov a,e
+065b 065b d e9
+065b 065b s pchl ;call OUT, RET
+065c 065c s
+065c 065c s ;--------------------------------------------------------------------------
+065c 065c s ; pinpt (I) - input data from a port
+065c 065c s ;--------------------------------------------------------------------------
+065c 065c d cda507
+065c 065c s pinpt call dspMsg
+065f 065f d 49ce
+065f 065f s db 'I','N'+80h
+0661 0661 s
+0661 0661 d 0e02
+0661 0661 s mvi c,2
+0663 0663 d cd2207
+0663 0663 s call ahe0 ;port number to e
+0666 0666 s
+0666 0666 d 21cfff
+0666 0666 s lxi h,SPTR-30H ;form IN nn, RET in memory at h
+0669 0669 d 36c9
+0669 0669 s mvi m,0C9H ;RET opcode
+066b 066b d 2b
+066b 066b s dcx h
+066c 066c d 73
+066c 066c s mov m,e ;input port of IN instruction
+066d 066d d 2b
+066d 066d s dcx h
+066e 066e d 36db
+066e 066e s mvi m,0DBH ;IN opcode
+0670 0670 d cdcdff
+0670 0670 s call SPTR-32H
+0673 0673 d c37907
+0673 0673 s jmp pt2
+0676 0676 s
+0676 0676 s ;---------------------------------------------------------------------
+0676 0676 s ; hexLoad (H or L) - load intel hex through 2SIO serial port 0 or 1
+0676 0676 s ;---------------------------------------------------------------------
+0676 0676 d cda507
+0676 0676 s hexload call dspMsg
+0679 0679 d 4845584c4f41c4
+0679 0679 s db 'HEXLOA','D'+80h
+0680 0680 s
+0680 0680 d 0e01
+0680 0680 s mvi c,1 ;read one hex digit
+0682 0682 d cd2207
+0682 0682 s call ahe0 ;digit is in e
+0685 0685 d 21dfff
+0685 0685 s lxi h,SIOPORT ;hl->location on stack to save port
+0688 0688 d 73
+0688 0688 s mov m,e ;SIOPORT = 0 or 1
+0689 0689 s
+0689 0689 s ; rcvLine - receive a hex file line
+0689 0689 s
+0689 0689 d cd6307
+0689 0689 s rcvLine call crlf
+068c 068c d 0e00
+068c 068c s mvi c,0 ;clear echo character flag
+068e 068e s
+068e 068e d cdf306
+068e 068e s wtMark call getChar ;read next character
+0691 0691 d d63a
+0691 0691 s sui ':' ;record marker?
+0693 0693 d c28e06
+0693 0693 s jnz wtMark ;no, keep looking
+0696 0696 s
+0696 0696 s ; Have start of new record. Save the byte count and load address.
+0696 0696 s ; The load address is echoed to the screen so the user can
+0696 0696 s ; see the file load progress.
+0696 0696 s
+0696 0696 d 57
+0696 0696 s mov d,a ;init checksum in D to zero
+0697 0697 s
+0697 0697 d cdd506
+0697 0697 s call iByte ;input two hex digits (byte count)
+069a 069a d 7b
+069a 069a s mov a,e ;test for zero byte count
+069b 069b d b7
+069b 069b s ora a
+069c 069c d cac306
+069c 069c s jz flush ;count of 0 means end
+069f 069f s
+069f 069f d 43
+069f 069f s mov b,e ;B = byte count on line
+06a0 06a0 s
+06a0 06a0 d 0c
+06a0 06a0 s inr c ;set echo flag for address bytes
+06a1 06a1 d cdd506
+06a1 06a1 s call iByte ;get MSB of address
+06a4 06a4 d 63
+06a4 06a4 s mov h,e ;H = address MSB
+06a5 06a5 d cdd506
+06a5 06a5 s call iByte ;get LSB of address
+06a8 06a8 d 6b
+06a8 06a8 s mov l,e ;L = address LSB
+06a9 06a9 d 0d
+06a9 06a9 s dcr c ;clear echo flag
+06aa 06aa s
+06aa 06aa d cdd506
+06aa 06aa s call iByte ;ignore/discard record type
+06ad 06ad s
+06ad 06ad s ; Receive the data bytes of the record and move to memory
+06ad 06ad s
+06ad 06ad d cdd506
+06ad 06ad s data call iByte ;read a data byte (2 hex digits)
+06b0 06b0 d 73
+06b0 06b0 s mov m,e ;store in memory
+06b1 06b1 d 23
+06b1 06b1 s inx h
+06b2 06b2 d 05
+06b2 06b2 s dcr b
+06b3 06b3 d c2ad06
+06b3 06b3 s jnz data
+06b6 06b6 s
+06b6 06b6 s ; Validate checksum
+06b6 06b6 s
+06b6 06b6 d cdd506
+06b6 06b6 s call iByte ;read and add checksum
+06b9 06b9 d ca8906
+06b9 06b9 s jz rcvLine ;checksum good, receive next line
+06bc 06bc s
+06bc 06bc d cda507
+06bc 06bc s call dspMsg ;display error message
+06bf 06bf d 204552d2
+06bf 06bf s db ' ER','R'+80h
+06c3 06c3 s ;fall into flush
+06c3 06c3 s
+06c3 06c3 s ; flush - flush rest of file as it comes in until no characters
+06c3 06c3 s ; received for about 1/4 second to prevent incoming file
+06c3 06c3 s ; data looking like typed monitor commands. Only the console
+06c3 06c3 s ; port needs to be flushed.
+06c3 06c3 s
+06c3 06c3 d db11
+06c3 06c3 s flush in COND ;clear possible received char
+06c5 06c5 d 11b128
+06c5 06c5 s lxi d,10417 ;.25s timeout for 48 cycle loop
+06c8 06c8 s
+06c8 06c8 d db10
+06c8 06c8 s flshLp in CONS ;(10) look for character on console
+06ca 06ca d 0f
+06ca 06ca s rrc ;(4) data flag in carry
+06cb 06cb d dac306
+06cb 06cb s jc flush ;(10) data received, restart
+06ce 06ce s
+06ce 06ce d 1b
+06ce 06ce s dcx d ;(5) decrement timeout
+06cf 06cf d 7a
+06cf 06cf s mov a,d ;(5)
+06d0 06d0 d b3
+06d0 06d0 s ora e ;(4)
+06d1 06d1 d c2c806
+06d1 06d1 s jnz flshLp ;(10) loop until zero
+06d4 06d4 d c9
+06d4 06d4 s ret ;done
+06d5 06d5 s
+06d5 06d5 s ;-----------------------------------------------------------
+06d5 06d5 s ; iByte - read two ascii hex bytes and return binary
+06d5 06d5 s ; value in e.
+06d5 06d5 s ;-----------------------------------------------------------
+06d5 06d5 d cdf306
+06d5 06d5 s iByte call getChar ;get a character
+06d8 06d8 d cdeb06
+06d8 06d8 s call asc2Bin ;ascii hex digit to binary
+06db 06db d 87
+06db 06db s add a ;put in msn, zero lsn
+06dc 06dc d 87
+06dc 06dc s add a
+06dd 06dd d 87
+06dd 06dd s add a
+06de 06de d 87
+06de 06de s add a
+06df 06df d 5f
+06df 06df s mov e,a ;save byte with MSN in E
+06e0 06e0 s
+06e0 06e0 s ; 2nd byte (LSN)
+06e0 06e0 s
+06e0 06e0 d cdf306
+06e0 06e0 s call getChar ;get a character
+06e3 06e3 d cdeb06
+06e3 06e3 s call asc2Bin ;ascii hex digit to binary
+06e6 06e6 d 83
+06e6 06e6 s add e ;combine msn and lsn
+06e7 06e7 d 5f
+06e7 06e7 s mov e,a ;save in EH
+06e8 06e8 d 82
+06e8 06e8 s add d ;add character to checksum
+06e9 06e9 d 57
+06e9 06e9 s mov d,a
+06ea 06ea d c9
+06ea 06ea s ret
+06eb 06eb s
+06eb 06eb s ;-------------------------------------------------------------
+06eb 06eb s ; asc2Bin - ASCII hex digit to binary conversion. Digit
+06eb 06eb s ; passed in a, returned in a. Errors ignored as checksum
+06eb 06eb s ; will eventually kick this out.
+06eb 06eb s ;-------------------------------------------------------------
+06eb 06eb d d630
+06eb 06eb s asc2Bin sui '0' ;'0' to 0
+06ed 06ed d fe0a
+06ed 06ed s cpi 10 ;0-9 ?
+06ef 06ef d d8
+06ef 06ef s rc
+06f0 06f0 s
+06f0 06f0 d d607
+06f0 06f0 s sui 7 ;'A-F' to A-F
+06f2 06f2 d c9
+06f2 06f2 s ret
+06f3 06f3 s
+06f3 06f3 s ;-------------------------------------------------------------
+06f3 06f3 s ; getChar - read a character from the 2SIO port specified in
+06f3 06f3 s ; SIOPORT. The character is also echoed to the console port
+06f3 06f3 s ; if the echo flag (c) is set (non-zero)
+06f3 06f3 s ;-------------------------------------------------------------
+06f3 06f3 d c5
+06f3 06f3 s getChar push b ;save b,c
+06f4 06f4 d 3adfff
+06f4 06f4 s lda SIOPORT ;a=pseudo port to use
+06f7 06f7 d b7
+06f7 06f7 s ora a ;port zero?
+06f8 06f8 d c20407
+06f8 06f8 s jnz inWait1 ;no, use port 1
+06fb 06fb s
+06fb 06fb s ; in through 1st port (0) on 2SIO
+06fb 06fb s
+06fb 06fb d cdd607
+06fb 06fb s inWait0 call cntlc ;test for character from console
+06fe 06fe d cafb06
+06fe 06fe s jz inWait0
+0701 0701 d c30f07
+0701 0701 s jmp haveChr
+0704 0704 s
+0704 0704 s ; in through 2nd port (1) on 2SIO, check for ctrl-c on console
+0704 0704 s ; while waiting
+0704 0704 s
+0704 0704 d cdd607
+0704 0704 s inWait1 call cntlc ;look for ctrl-c on console
+0707 0707 d db12
+0707 0707 s in CONS+2 ;wait for character on 2nd 2SIO
+0709 0709 d 0f
+0709 0709 s rrc ;data flag in carry
+070a 070a d d20407
+070a 070a s jnc inWait1
+070d 070d d db13
+070d 070d s in COND+2 ;a=character read
+070f 070f s
+070f 070f s ; process new character in a. Echo to console if c is non-zero
+070f 070f s
+070f 070f d 47
+070f 070f s haveChr mov b,a ;save character in b
+0710 0710 d 79
+0710 0710 s mov a,c ;echo flag (c) set?
+0711 0711 d b7
+0711 0711 s ora a
+0712 0712 d ca1a07
+0712 0712 s jz noEcho ;no echo
+0715 0715 s
+0715 0715 d 78
+0715 0715 s mov a,b ;a=character to send
+0716 0716 d c1
+0716 0716 s pop b ;restore b,c
+0717 0717 d c34807
+0717 0717 s jmp ptcn ;display character and exit
+071a 071a s
+071a 071a d 78
+071a 071a s noEcho mov a,b ;a=byte read
+071b 071b d c1
+071b 071b s pop b ;restore b,c
+071c 071c d c9
+071c 071c s ret
+071d 071d s
+071d 071d s ;********************************************************************
+071d 071d s ;
+071d 071d s ; Type conversion, input, output subroutines
+071d 071d s ;
+071d 071d s ;********************************************************************
+071d 071d s
+071d 071d s ;------------------------------------------------------------
+071d 071d s ; tahex - read two 16 bit addresses. 1st returned in HL, 2nd in DE
+071d 071d s ;------------------------------------------------------------
+071d 071d d cd2007
+071d 071d s tahex call ahex ;get first address param
+0720 0720 s ;fall into ahex to get 2nd param
+0720 0720 s
+0720 0720 s ;------------------------------------------------------------
+0720 0720 s ; ahex - read up to 4 hex digits to binary, return in de
+0720 0720 s ;------------------------------------------------------------
+0720 0720 d 0e04
+0720 0720 s ahex mvi c,4 ;count of 4 digits
+0722 0722 d 210000
+0722 0722 s ahe0 lxi h,0 ;16 bit zero
+0725 0725 d cdb307
+0725 0725 s ahe1 call rdcn ;read a byte
+0728 0728 d fe30
+0728 0728 s ahexNr cpi '0'
+072a 072a d da1f04
+072a 072a s jc start ;below '0', abort
+072d 072d d fe3a
+072d 072d s cpi ':'
+072f 072f d d45607
+072f 072f s cnc alph
+0732 0732 d 29
+0732 0732 s dad h
+0733 0733 d 29
+0733 0733 s dad h
+0734 0734 d 29
+0734 0734 s dad h
+0735 0735 d 29
+0735 0735 s dad h
+0736 0736 d d630
+0736 0736 s sui '0' ;ascii bias
+0738 0738 d fe0a
+0738 0738 s cpi 10 ;digit 0-10
+073a 073a d da3f07
+073a 073a s jc alf
+073d 073d d d607
+073d 073d s sui 7 ;alpha bias
+073f 073f d 85
+073f 073f s alf add l
+0740 0740 d 6f
+0740 0740 s mov l,a
+0741 0741 d 0d
+0741 0741 s dcr c
+0742 0742 d c22507
+0742 0742 s jnz ahe1 ;keep reading
+0745 0745 d eb
+0745 0745 s xchg ;result in de
+0746 0746 s ;fall through to print a space
+0746 0746 s ;------------------------------------------------------------
+0746 0746 s ; spce - print a space
+0746 0746 s ; ptcn - print character passed in a
+0746 0746 s ;------------------------------------------------------------
+0746 0746 d 3e20
+0746 0746 s spce mvi a,' ' ;print space
+0748 0748 d f5
+0748 0748 s ptcn push psw
+0749 0749 s
+0749 0749 d db10
+0749 0749 s ptlop in CONS ;wait for OK to transmit
+074b 074b d e602
+074b 074b s ani TBE
+074d 074d d ca4907
+074d 074d s jz ptlop
+0750 0750 s
+0750 0750 d f1
+0750 0750 s pop psw ;recover a
+0751 0751 d e67f
+0751 0751 s ani 07fh ;get rid of msbit
+0753 0753 d d311
+0753 0753 s out COND ;and print it
+0755 0755 d c9
+0755 0755 s ret ;return from ptcn
+0756 0756 s
+0756 0756 s ;------------------------------------------------------------
+0756 0756 s ; alph - verify valid hex digit, abort to command loop if not
+0756 0756 s ;------------------------------------------------------------
+0756 0756 d fe41
+0756 0756 s alph cpi 'A'
+0758 0758 d da1f04
+0758 0758 s jc start
+075b 075b d e65f
+075b 075b s ani 05fh
+075d 075d d fe47
+075d 075d s cpi 'G'
+075f 075f d d21f04
+075f 075f s jnc start
+0762 0762 d c9
+0762 0762 s ret
+0763 0763 s
+0763 0763 s ;------------------------------------------------------------
+0763 0763 s ; crlf - print CR/LF
+0763 0763 s ;------------------------------------------------------------
+0763 0763 d 3e0d
+0763 0763 s crlf mvi a,CR
+0765 0765 d cd4807
+0765 0765 s call ptcn
+0768 0768 d 3e0a
+0768 0768 s mvi a,LF
+076a 076a d c34807
+076a 076a s jmp ptcn
+076d 076d s
+076d 076d s ;------------------------------------------------------------
+076d 076d s ; err - display the address in hl followed by the value
+076d 076d s ; in b, then the value in a.
+076d 076d s ;------------------------------------------------------------
+076d 076d d f5
+076d 076d s err push psw ;save A
+076e 076e d cd8107
+076e 076e s call ptad ;print address
+0771 0771 d 78
+0771 0771 s mov a,b ;print B
+0772 0772 d cd7907
+0772 0772 s call pt2
+0775 0775 d cd4607
+0775 0775 s call spce
+0778 0778 d f1
+0778 0778 s pop psw ;print A
+0779 0779 d f5
+0779 0779 s pt2 push psw
+077a 077a d cd9307
+077a 077a s call binh
+077d 077d d f1
+077d 077d s pop psw
+077e 077e d c39707
+077e 077e s jmp binl
+0781 0781 s
+0781 0781 s ;------------------------------------------------------------
+0781 0781 s ; ptad - display the address in h
+0781 0781 s ;------------------------------------------------------------
+0781 0781 d cd6307
+0781 0781 s ptad call crlf ;print cr,lf
+0784 0784 d cdc707
+0784 0784 s call pause
+0787 0787 d 7c
+0787 0787 s mov a,h ;print
+0788 0788 d cd7907
+0788 0788 s call pt2 ;ascii
+078b 078b d 7d
+078b 078b s mov a,l ;codes
+078c 078c d cd7907
+078c 078c s call pt2 ;for
+078f 078f d cd4607
+078f 078f s call spce ;address
+0792 0792 d c9
+0792 0792 s ret
+0793 0793 s
+0793 0793 s ;------------------------------------------------------------
+0793 0793 s ; binh - print MSN of byte passed in A
+0793 0793 s ; binl - print LSN of byte passed in A
+0793 0793 s ;------------------------------------------------------------
+0793 0793 d 1f
+0793 0793 s binh rar
+0794 0794 d 1f
+0794 0794 s rar
+0795 0795 d 1f
+0795 0795 s rar
+0796 0796 d 1f
+0796 0796 s rar
+0797 0797 d e60f
+0797 0797 s binl ani 0fh ;low 4 bits
+0799 0799 d c630
+0799 0799 s adi '0' ;ascii bias
+079b 079b d fe3a
+079b 079b s cpi 03ah ;digit 0-9
+079d 079d d da4807
+079d 079d s jc ptcn
+07a0 07a0 d c607
+07a0 07a0 s adi 7 ;digit A-F
+07a2 07a2 d c34807
+07a2 07a2 s jmp ptcn
+07a5 07a5 s
+07a5 07a5 s ;------------------------------------------------------------
+07a5 07a5 s ; dspMsg - display in-line message. String terminated by byte
+07a5 07a5 s ; with msbit set.
+07a5 07a5 s ;------------------------------------------------------------
+07a5 07a5 d e1
+07a5 07a5 s dspMsg pop h ;hl->string to display
+07a6 07a6 s
+07a6 07a6 d 7e
+07a6 07a6 s dspLoop mov a,m ;a=next character to display
+07a7 07a7 d cd4807
+07a7 07a7 s call ptcn ;display character
+07aa 07aa d b6
+07aa 07aa s ora m ;MSB set? (last byte)
+07ab 07ab d 23
+07ab 07ab s inx h ;point to next character
+07ac 07ac d f2a607
+07ac 07ac s jp dspLoop ;no, keep looping
+07af 07af s
+07af 07af d cd4607
+07af 07af s call spce ;display a trailing space
+07b2 07b2 d e9
+07b2 07b2 s pchl ;return past the string
+07b3 07b3 s
+07b3 07b3 s ;------------------------------------------------------------
+07b3 07b3 s ; rdcn - read from console to A with echo to screen
+07b3 07b3 s ; getCon - read from console to A without echo
+07b3 07b3 s ;------------------------------------------------------------
+07b3 07b3 d cdbc07
+07b3 07b3 s rdcn call getCon ;get character from console
+07b6 07b6 d fe1b
+07b6 07b6 s cpi ESC ;ESC confuses smart terminals
+07b8 07b8 d c8
+07b8 07b8 s rz ; so don't echo escape
+07b9 07b9 d c34807
+07b9 07b9 s jmp ptcn ;echo onto printer
+07bc 07bc s
+07bc 07bc d db10
+07bc 07bc s getCon in CONS ;read keyboard status
+07be 07be d 0f
+07be 07be s rrc ;data available flag in carry
+07bf 07bf d d2bc07
+07bf 07bf s jnc getCon
+07c2 07c2 s
+07c2 07c2 d db11
+07c2 07c2 s in COND ;read from keyboard
+07c4 07c4 d e67f
+07c4 07c4 s ani 07fh ;strip off msb
+07c6 07c6 d c9
+07c6 07c6 s ret
+07c7 07c7 s
+07c7 07c7 s ;------------------------------------------------------------
+07c7 07c7 s ; pause - pause/resume with spacebar. Also look for a ctrl-c
+07c7 07c7 s ; or ESC to abort.
+07c7 07c7 s ;------------------------------------------------------------
+07c7 07c7 d cdd607
+07c7 07c7 s pause call cntlc ;look for abort or other character
+07ca 07ca d fe20
+07ca 07ca s cpi ' '
+07cc 07cc d c0
+07cc 07cc s rnz ;return if not space or abort
+07cd 07cd s
+07cd 07cd d cdd607
+07cd 07cd s ploop call cntlc ;loop here until space or abort pressed
+07d0 07d0 d fe20
+07d0 07d0 s cpi ' '
+07d2 07d2 d c2cd07
+07d2 07d2 s jnz ploop
+07d5 07d5 d c9
+07d5 07d5 s ret
+07d6 07d6 s
+07d6 07d6 s ;------------------------------------------------------------
+07d6 07d6 s ; cntlc - see if a character has been typed. If not, return
+07d6 07d6 s ; zero true. If ctrl-c or ESC typed, abort and return to
+07d6 07d6 s ; the command loop. Otherwise, return the character typed.
+07d6 07d6 s ;------------------------------------------------------------
+07d6 07d6 d db10
+07d6 07d6 s cntlc in CONS ;anything typed?
+07d8 07d8 d e601
+07d8 07d8 s ani RDA
+07da 07da d c8
+07da 07da s rz ;no, exit with zero true
+07db 07db s
+07db 07db d db11
+07db 07db s in COND ;get the typed character
+07dd 07dd d e67f
+07dd 07dd s ani 07fh
+07df 07df d fe03
+07df 07df s cpi CTRLC ;abort with ctrl-c (2.0 style)
+07e1 07e1 d ca1f04
+07e1 07e1 s jz start
+07e4 07e4 d fe1b
+07e4 07e4 s cpi ESC ;or ESC (4.x style)
+07e6 07e6 d ca1f04
+07e6 07e6 s jz start
+07e9 07e9 d c9
+07e9 07e9 s ret
+07ea 07ea s
+07ea 07ea s ;------------------------------------------------------------
+07ea 07ea s ; bmp - compare address and increment h. Return zero true
+07ea 07ea s ; if hl=de. Once hl=de, then de is incremented each time
+07ea 07ea s ; so the comparison remains true for subsequent calls.
+07ea 07ea s ;------------------------------------------------------------
+07ea 07ea d 7b
+07ea 07ea s bmp mov a,e ;compare lsb's of hl,de
+07eb 07eb d 95
+07eb 07eb s sub l
+07ec 07ec d c2f107
+07ec 07ec s jnz goon ;not equal
+07ef 07ef s
+07ef 07ef d 7a
+07ef 07ef s mov a,d ;compare msb's of hl,de
+07f0 07f0 d 9c
+07f0 07f0 s sbb h ;gives zero true if equal
+07f1 07f1 s
+07f1 07f1 d 23
+07f1 07f1 s goon inx h ;increment hl
+07f2 07f2 d c0
+07f2 07f2 s rnz ;exit if hl <> de yet
+07f3 07f3 s
+07f3 07f3 d 13
+07f3 07f3 s inx d ;increase de as well so it will
+07f4 07f4 d c9
+07f4 07f4 s ret ; still be equal next time
+07f5 07f5 s
+07f5 07f5 s end
+000a v lf
+000d v cr
+0779 a pt2
+073f a alf
+0001 v rda
+0002 v tbe
+001b v esc
+07ea a bmp
+0532 a pgm
+076d a err
+0637 a skp
+0722 a ahe0
+0725 a ahe1
+055b a con1
+0565 a con2
+06ad a data
+0793 a binh
+0011 v cond
+046a a exec
+0720 a ahex
+0763 a crlf
+0569 a fill
+0781 a ptad
+0548 a crig
+04a6 a cycl
+0746 a spce
+07b3 a rdcn
+0631 a obcp
+0756 a alph
+04f1 a disp
+04e2 a rndm
+04ea a peve
+0010 v cons
+ff00 v boot
+0748 a ptcn
+05b6 a ndmt
+0499 a tmem
+053f a pglp
+061f a cont
+0797 a binl
+07f1 a goon
+04c6 a rlop
+04b1 a tlop
+ffff v sptr
+05ef a srch1
+05fb a srch2
+058f a exchg
+07d6 a cntlc
+05ab a nexch
+0003 v ctrlc
+0584 a moveb
+071d a tahex
+05c2 a ndlop
+07c7 a pause
+06d5 a ibyte
+05cf a compr
+06c3 a flush
+0400 a monit
+05a0 a mloop
+07cd a ploop
+065c a pinpt
+041f a start
+05de a vmlop
+0749 a ptlop
+057c a zloop
+063f a poutp
+0444 a cmdtbl
+0513 a dmpasc
+071a a noecho
+0520 a dspasc
+07bc a getcon
+0603 a dosrch
+0501 a dmphex
+0476 a doboot
+0728 a ahexnr
+06c8 a flshlp
+0596 a domove
+0480 a chksum
+04d4 a skiprd
+07a5 a dspmsg
+051e a dspdot
+048c a csloop
+068e a wtmark
+04bb a skipwr
+06eb a asc2bin
+06fb a inwait0
+0704 a inwait1
+06f3 a getchar
+070f a havechr
+0676 a hexload
+04fb a dmpline
+0689 a rcvline
+07a6 a dsploop
+ffdf v sioport
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.bds
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cim
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cim
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cim (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cim (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cim
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cmd
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cmd (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.cmd
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.hex
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.hex (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.hex (revision 3)
@@ -0,0 +1,65 @@
+:100400003E03D310D3123E11D310D31231FFFFCDD0
+:10041000A5070D0A0A414C544D4F4E20312EB131E3
+:10042000FFFF211F04E5CD63073E2ACD4807CDBC61
+:1004300007E65FFE42D8FE55D021C00487856F5E77
+:100440002356EBE97604CF05F1048F05FB056A041A
+:1004500076065C066A04690576068405B6053F06DD
+:1004600032058004B605EF059904CDA507474F5422
+:10047000CFCD2007EBE9CDA507424F4FD4C300FFF6
+:10048000CDA507435355CDCD1D0706007E8047CD32
+:10049000EA07C28C0478C37907CDA507544553D425
+:1004A000CD1D07015A5A3E2ECD4807CDE204C5E5C1
+:1004B000D57CFEFECABB04CDE20470CDEA07C2B112
+:1004C00004D1E1C1E5D57CFEFECAD404CDE2047EB0
+:1004D000B8C46D07CDEA07C2C604D1E1CDC707C3D2
+:1004E000A60478E6B4A7EAEA043779174F781747E5
+:1004F000C9CDA50744554DD0CD1D07E50E10CD81C2
+:10050000077ECD7907CD4607230DC20105CD4607ED
+:10051000E10E107EFE7FD21E05FE20D220053E2E6B
+:10052000CD4807CDEA070DC21305CDEA07C82BC396
+:10053000FB04CDA5075047CDCD2007EBCD63077E4B
+:10054000CD79073E2DCD4807CDB307FE20CA6505FE
+:10055000FE0DC25B05CD6307C34805EB2100000E0D
+:1005600002CD28077323C33F05CDA50746494CCCD0
+:10057000CD1D07E50E02CD2207EBE3C171CDEA07E1
+:10058000C8C37C05CDA5074D4F56C5AFC39605CD55
+:10059000A507455843C847CD1D07E5CD2007EBE328
+:1005A0004EE378B7CAAB057EE377E37123E3CDEA88
+:1005B00007C2A005E1C9CDA50752414D544FD02136
+:1005C000FFFF237E472F77BE70CAC205C36D07CDDC
+:1005D000A507434F4DD0CD1D07E5CD2007EB7E236A
+:1005E000E3BE46C46D07CDEA07E3C2DE05E1C9CD2F
+:1005F000A50746494E44B1AFC30306CDA5074649FA
+:100600004E44B2F5CD1D07E50E02CD2207EB45E1C4
+:10061000F1B7F5CA1F06E50E02CD2207EB4DE17ECC
+:10062000B8C23706F1B7F5CA3106237E2BB9C237F7
+:1006300006237E2BCD6D07CDEA07C21F06F1C9CD7B
+:10064000A5074F55D40E02CD22070E02CD22075525
+:1006500021CFFF36C92B722B36D37BE9CDA50749B5
+:10066000CE0E02CD220721CFFF36C92B732B36DBEE
+:10067000CDCDFFC37907CDA5074845584C4F41C4A0
+:100680000E01CD220721DFFF73CD63070E00CDF3EE
+:1006900006D63AC28E0657CDD5067BB7CAC30643E7
+:1006A0000CCDD50663CDD5066B0DCDD506CDD506C3
+:1006B000732305C2AD06CDD506CA8906CDA5072090
+:1006C0004552D2DB1111B128DB100FDAC3061B7AB9
+:1006D000B3C2C806C9CDF306CDEB06878787875F0F
+:1006E000CDF306CDEB06835F8257C9D630FE0AD81C
+:1006F000D607C9C53ADFFFB7C20407CDD607CAFB84
+:1007000006C30F07CDD607DB120FD20407DB134752
+:1007100079B7CA1A0778C1C3480778C1C9CD20077D
+:100720000E04210000CDB307FE30DA1F04FE3AD4D8
+:10073000560729292929D630FE0ADA3F07D6078528
+:100740006F0DC22507EB3E20F5DB10E602CA490714
+:10075000F1E67FD311C9FE41DA1F04E65FFE47D2FE
+:100760001F04C93E0DCD48073E0AC34807F5CD8199
+:100770000778CD7907CD4607F1F5CD9307F1C397FB
+:1007800007CD6307CDC7077CCD79077DCD7907CD30
+:100790004607C91F1F1F1FE60FC630FE3ADA48077B
+:1007A000C607C34807E17ECD4807B623F2A607CDAA
+:1007B0004607E9CDBC07FE1BC8C34807DB100FD2B4
+:1007C000BC07DB11E67FC9CDD607FE20C0CDD6071A
+:1007D000FE20C2CD07C9DB10E601C8DB11E67FFEB3
+:1007E00003CA1F04FE1BCA1F04C97B95C2F1077A06
+:0507F0009C23C013C9A9
+:0000000000
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.hex
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lcas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lcas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lcas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lcas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lcas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lst
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lst (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lst (revision 3)
@@ -0,0 +1,1016 @@
+ 1: ;-------------------------------------------------------------------------
+ 2: ; ALTMON.ASM - 1K ROM monitor for the Altair 8800.
+ 3: ;
+ 4: ; This monitor is based on the 2.0C monitor from Vector Graphic. The
+ 5: ; original version has been updated to use Altair 2SIO serial ports
+ 6: ; for I/O and several commands have been added and/or modified.
+ 7: ;
+ 8: ; A typical location for this PROM in an Altair is at F800, though
+ 9: ; it can be assembled at most any address. The stack is typically
+ 10: ; placed at the top of the minimum RAM you expect to have in your
+ 11: ; system.
+ 12: ;
+ 13: ; Version Date Author
+ 14: ; ------- ---------- ---------------------------------------
+ 15: ; 1.0 01/10/2016 Mike Douglas (Original)
+ 16: ;
+ 17: ; 1.1 02/29/2016 Mike Douglas
+ 18: ; Fix bug in DUMP code that caused improper range of bytes
+ 19: ; to display. Also in DUMP, display '.' for all characters
+ 20: ; 7Fh or above.
+ 21: ;
+ 22: ; Initialize 2nd 2SIO port so that loading of Intel HEX
+ 23: ; files works over the 2nd port. Only flush hex file
+ 24: ; input on the console serial port to free up code space
+ 25: ; and because it's not really required for the 2nd port.
+ 26: ;
+ 27: ;-------------------------------------------------------------------------
+ 28: ;
+ 29: ; Following is a summary of changes from the original VG 2.0c monitor:
+ 30: ;
+ 31: ; All commands immediately echo a full command name as soon as the
+ 32: ; first command letter is typed (e.g., typing "M" immediately
+ 33: ; displays "MOVE"). This makes it easier to identify commands
+ 34: ; without a list of commands present.
+ 35: ;
+ 36: ; The ESC key can be pressed to abort input or commands as in
+ 37: ; the later 4.x monitors from VG. The original ctrl-c abort is
+ 38: ; still present as well.
+ 39: ;
+ 40: ; The B (boot) command jumps to the Altair disk boot loader PROM
+ 41: ; at FF00 instead of the North Star boot ROM.
+ 42: ;
+ 43: ; A (ASCII dump) command removed and D (hex dump) updated to display
+ 44: ; both hex and ASCII.
+ 45: ;
+ 46: ; X (exchange) command changed to the E command.
+ 47: ;
+ 48: ; H command added to load Intel hex file via either serial port
+ 49: ; on a 2SIO. The L (load and go from tape) does a hex file load
+ 50: ; as well (all tape commands eliminated).
+ 51: ;
+ 52: ; J treated as jump (i.e., go to) command instead of jump to North
+ 53: ; Star DOS.
+ 54: ;
+ 55: ; K treated as fill memory with "K"onstant instead of jump to zero
+ 56: ; (was the Z command which has been removed).
+ 57: ;
+ 58: ; R command sizes RAM (i.e., runs the N non-destructive memory test)
+ 59: ; Was previously a read from cassette command. All cassette commands
+ 60: ; have been removed.
+ 61: ;
+ 62: ; The Y command (Vector Graphic relocating loader) command has been
+ 63: ; removed.
+ 64: ;
+ 65: ; The T test memory command skips the 256 byte page the stack is on
+ 66: ; to prevent crashing the program. A "." pacifier is displayed
+ 67: ; after each cycle through the memory test range is completed
+ 68: ;
+ 69: ;-------------------------------------------------------------------------
+ 70: ;
+ 71: ; Command Summary:
+ 72: ;
+ 73: ; B jump to Altair disk boot loader (FF00)
+ 74: ; C SSSS FFFF CCCC compare blocks
+ 75: ; D SSSS FFFF dump in hex and ASCII
+ 76: ; E SSSS FFFF DDDD exchange block
+ 77: ; F SSSS FFFF DD DD find two byte sequence
+ 78: ; G SSSS go to and execute
+ 79: ; H P load Intel hex file from 2SIO port 0 or 1
+ 80: ; I PP input from I/O port
+ 81: ; J SSSS go to and execute (G)
+ 82: ; K SSSS FFFF DD fill with "K"onstant
+ 83: ; L P load Intel hex file from 2SIO port 0 or 1
+ 84: ; M SSSS FFFF DDDD move block
+ 85: ; N non destructive memory test (size RAM)
+ 86: ; O PP DD output to port
+ 87: ; P LLLL program memory
+ 88: ; Q SSSS FFFF compute checksum
+ 89: ; R non destructive memory test (size RAM)
+ 90: ; S SSSS FFFF DD search for single byte sequence
+ 91: ; T SSSS FFFF test memory
+ 92: ;
+ 93: ;-------------------------------------------------------------------------
+ 94: ;
+ 95: ; Memory location equates
+ 96:
+ 97: - 0400 org 00400h ;ROM location
+ 98:
+ 99: - FFFF SPTR equ 0ffffh ;stack pointer (use 256 byte boundary)
+ 100: - FFDF SIOPORT equ SPTR-32 ;2SIO port used for hex load
+ 101: - FF00 BOOT equ 0ff00h ;Altair disk boot loader ROM
+ 102:
+ 103: ; 88-2SIO equates
+ 104:
+ 105: - 0010 CONS equ 10h ;console status port
+ 106: - 0011 COND equ 11h ;console data port
+ 107: - 0002 TBE equ 2 ;transmit buffer entry
+ 108: - 0001 RDA equ 1 ;receive data available
+ 109:
+ 110: ; Misc Equates
+ 111:
+ 112: - 000D CR equ 13 ;ASCII carriage return
+ 113: - 000A LF equ 10 ;ASCII line feed
+ 114: - 0003 CTRLC equ 3 ;ASCII control-c
+ 115: - 001B ESC equ 27 ;ASCII ESCAPE
+ 116:
+ 117: ;---------------------------------------------------------
+ 118: ; monit - monitor entry point
+ 119: ;---------------------------------------------------------
+ 120: 0+7 0400 3E03 monit mvi a,3 ;reset 6850 uart
+ 121: 7+10 0402 D310 out CONS
+ 122: 17+10 0404 D312 out CONS+2 ;2nd 2SIO port as well
+ 123: 27+7 0406 3E11 mvi a,11h ;8N2
+ 124: 34+10 0408 D310 out CONS
+ 125: 44+10 040A D312 out CONS+2 ;2nd 2SIO port as well
+ 126:
+ 127: 54+10 040C 31FFFF lxi sp,SPTR
+ 128: 64+17 040F CDA507 call dspMsg ;display welcome banner
+ 129: - 0412 0D0A0A41 db CR,LF,LF,'ALTMON 1.','1'+80h
+ 4C544D4F
+ 4E20312E
+ B1
+ 130:
+ 131: ; start - command processing loop
+ 132:
+ 133: 81+10 041F 31FFFF start lxi sp,SPTR ;re-init stack pointer
+ 134: 91+10 0422 211F04 lxi h,start ;RET's go back to start
+ 135: 101+11 0425 E5 push h
+ 136:
+ 137: 112+17 0426 CD6307 call crlf ;display '*' prompt after CR/LF
+ 138: 129+7 0429 3E2A mvi a,'*'
+ 139: 136+17 042B CD4807 call ptcn
+ 140:
+ 141: 153+17 042E CDBC07 call getCon ;read command from keyboard
+ 142: 170+7 0431 E65F ani 05FH ;lower case to upper case
+ 143: 177+7 0433 FE42 cpi 'B'
+ 144: 184+5+6 0435 D8 rc ;too small
+ 145: 189+7 0436 FE55 cpi 'U'
+ 146: 196+5+6 0438 D0 rnc ;too large
+ 147:
+ 148: 201+10 0439 21C004 lxi h,cmdTbl+100h-2*'B' ;'B' indexes to start of cmdtbl
+ 149: 211+4 043C 87 add a ;2 bytes per entry
+ 150: 215+4 043D 85 add l
+ 151: 219+5 043E 6F mov l,a
+ 152:
+ 153: 224+7 043F 5E mov e,m ;e=lsb of jump address
+ 154: 231+5 0440 23 inx h
+ 155: 236+7 0441 56 mov d,m ;d=high byte of jump address
+ 156: 243+5 0442 EB xchg
+ 157: 248+5 0443 E9 pchl ;away we go
+ 158:
+ 159: ; Command Table
+ 160:
+ 161: - 0444 7604 cmdTbl dw doboot ;B jump to Altair disk boot loader
+ 162: - 0446 CF05 dw compr ;C SSSS FFFF CCCC compare blocks
+ 163: - 0448 F104 dw disp ;D SSSS FFFF dump in hex
+ 164: - 044A 8F05 dw exchg ;E SSSS FFFF DDDD exchange block
+ 165: - 044C FB05 dw srch2 ;F SSSS FFFF DD DD two byte search
+ 166: - 044E 6A04 dw exec ;G SSSS go to and execute
+ 167: - 0450 7606 dw hexLoad ;H P load Intel hex file from port
+ 168: - 0452 5C06 dw pinpt ;I PP input from I/O port
+ 169: - 0454 6A04 dw exec ;J SSSS jump to and execute (G)
+ 170: - 0456 6905 dw fill ;K SSSS FFFF DD fill RAM with "k"onstant
+ 171: - 0458 7606 dw hexLoad ;L P load Intel hex file from port
+ 172: - 045A 8405 dw moveb ;M SSSS FFFF DDDD move block
+ 173: - 045C B605 dw ndmt ;N non destructive memory test (RAM size)
+ 174: - 045E 3F06 dw poutp ;O PP DD output to port
+ 175: - 0460 3205 dw pgm ;P LLLL program memory
+ 176: - 0462 8004 dw chksum ;Q SSSS FFFF compute checksum
+ 177: - 0464 B605 dw ndmt ;R non destructive memory test (RAM size)
+ 178: - 0466 EF05 dw srch1 ;S SSSS FFFF DD search for single byte
+ 179: - 0468 9904 dw tmem ;T SSSS FFFF test memory
+ 180:
+ 181: ;--------------------------------------------------------------------------
+ 182: ; exec (G or J) - execute the program at the address
+ 183: ;--------------------------------------------------------------------------
+ 184: 253+17 046A CDA507 exec call dspMsg
+ 185: - 046D 474F54CF db 'GOT','O'+80h
+ 186:
+ 187: 270+17 0471 CD2007 call ahex ;read address from keyboard
+ 188: 287+5 0474 EB xchg
+ 189: 292+5 0475 E9 pchl
+ 190:
+ 191: ;--------------------------------------------------------------------------
+ 192: ; doBoot (B) - boot floppy disk by jumping to DBL PROM at FF00
+ 193: ;--------------------------------------------------------------------------
+ 194: 297+17 0476 CDA507 doBoot call dspMsg
+ 195: - 0479 424F4FD4 db 'BOO','T'+80h
+ 196:
+ 197: 314+10 047D C300FF jmp BOOT
+ 198:
+ 199: ;--------------------------------------------------------------------------
+ 200: ; chksum (Q) - compute checksum
+ 201: ;--------------------------------------------------------------------------
+ 202: 324+17 0480 CDA507 chksum call dspMsg
+ 203: - 0483 435355CD db 'CSU','M'+80h
+ 204:
+ 205: 341+17 0487 CD1D07 call tahex
+ 206: 358+7 048A 0600 mvi b,0 ;start checksum = 0
+ 207:
+ 208: 365+7 048C 7E csloop mov a,m ;get data from memory
+ 209: 372+4 048D 80 add b ;add to checksum
+ 210: 376+5 048E 47 mov b,a
+ 211: 381+17 048F CDEA07 call bmp
+ 212: 398+10 0492 C28C04 jnz csloop ;repeat loop
+ 213:
+ 214: 408+5 0495 78 mov a,b ;a=checksum
+ 215: 413+10 0496 C37907 jmp pt2 ;print checksum and exit
+ 216:
+ 217: ;--------------------------------------------------------------------------
+ 218: ; tmem (T) - memory test routine
+ 219: ;--------------------------------------------------------------------------
+ 220: 423+17 0499 CDA507 tmem call dspMsg
+ 221: - 049C 544553D4 db 'TES','T'+80h
+ 222:
+ 223: 440+17 04A0 CD1D07 call tahex ;read addresses
+ 224: 457+10 04A3 015A5A lxi b,05a5ah ;init b,c
+ 225:
+ 226: 467+7 04A6 3E2E cycl mvi a,'.' ;display '.' before each cycle
+ 227: 474+17 04A8 CD4807 call ptcn
+ 228: 491+17 04AB CDE204 call rndm
+ 229: 508+11 04AE C5 push b ;keep all registers
+ 230: 519+11 04AF E5 push h
+ 231: 530+11 04B0 D5 push d
+ 232:
+ 233: 541+5 04B1 7C tlop mov a,h ;on stack page?
+ 234: 546+7 04B2 FEFE cpi (SPTR shr 8)-1 ;compare to msb of stack
+ 235: 553+10 04B4 CABB04 jz skipWr ;in stack, skip write
+ 236: 563+17 04B7 CDE204 call rndm
+ 237: 580+7 04BA 70 mov m,b ;write in memory
+ 238: 587+17 04BB CDEA07 skipWr call bmp
+ 239: 604+10 04BE C2B104 jnz tlop ;repeat loop
+ 240:
+ 241: 614+10 04C1 D1 pop d
+ 242: 624+10 04C2 E1 pop h ;restore original
+ 243: 634+10 04C3 C1 pop b ;values
+ 244: 644+11 04C4 E5 push h
+ 245: 655+11 04C5 D5 push d
+ 246:
+ 247: 666+5 04C6 7C rlop mov a,h ;on stack page?
+ 248: 671+7 04C7 FEFE cpi (SPTR shr 8)-1 ;compare to msb of stack
+ 249: 678+10 04C9 CAD404 jz skipRd ;in stack, skip the read
+ 250: 688+17 04CC CDE204 call rndm ;generate new sequence
+ 251: 705+7 04CF 7E mov a,m ;read memory
+ 252: 712+4 04D0 B8 cmp b ;compare memory
+ 253: 716+11+6 04D1 C46D07 cnz err ;call error routine
+ 254: 727+17 04D4 CDEA07 skipRd call bmp
+ 255: 744+10 04D7 C2C604 jnz rlop
+ 256:
+ 257: 754+10 04DA D1 pop d
+ 258: 764+10 04DB E1 pop h
+ 259: 774+17 04DC CDC707 call pause
+ 260: 791+10 04DF C3A604 jmp cycl
+ 261:
+ 262: ; rndm - this routine generates random numbers
+ 263:
+ 264: 801+5 04E2 78 rndm mov a,b ;look at b
+ 265: 806+7 04E3 E6B4 ani 0b4h ;mask bits
+ 266: 813+4 04E5 A7 ana a ;clear carry
+ 267: 817+10 04E6 EAEA04 jpe peve ;jump if even
+ 268: 827+4 04E9 37 stc
+ 269: 831+5 04EA 79 peve mov a,c ;look at c
+ 270: 836+4 04EB 17 ral ;rotate carry in
+ 271: 840+5 04EC 4F mov c,a ;restore c
+ 272: 845+5 04ED 78 mov a,b ;look at b
+ 273: 850+4 04EE 17 ral ;rotate carry in
+ 274: 854+5 04EF 47 mov b,a ;restore b
+ 275: 859+10 04F0 C9 ret ;return with new b,c
+ 276:
+ 277: ;--------------------------------------------------------------------------
+ 278: ; disp (D) - display memory contents
+ 279: ;--------------------------------------------------------------------------
+ 280: 869+17 04F1 CDA507 disp call dspMsg
+ 281: - 04F4 44554DD0 db 'DUM','P'+80h
+ 282:
+ 283: 886+17 04F8 CD1D07 call tahex ;read addresses
+ 284:
+ 285: 903+11 04FB E5 dmpLine push h ;save address at start of line
+ 286: 914+7 04FC 0E10 mvi c,16 ;16 locations per line
+ 287: 921+17 04FE CD8107 call ptad ;print current address
+ 288:
+ 289: ; dump line in hex
+ 290:
+ 291: 938+7 0501 7E dmpHex mov a,m ;a=byte to display
+ 292: 945+17 0502 CD7907 call pt2 ;display it
+ 293: 962+17 0505 CD4607 call spce
+ 294: 979+5 0508 23 inx h
+ 295: 984+5 0509 0D dcr c ;decrement line byte count
+ 296: 989+10 050A C20105 jnz dmpHex ;loop until 16 bytes done
+ 297:
+ 298: ; dump line in ASCII
+ 299:
+ 300: 999+17 050D CD4607 call spce
+ 301: 1016+10 0510 E1 pop h ;hl->start of line
+ 302: 1026+7 0511 0E10 mvi c,16 ;16 locations per line
+ 303:
+ 304: 1033+7 0513 7E dmpAsc mov a,m ;a=byte to display
+ 305: 1040+7 0514 FE7F cpi 7Fh ;test if >= 7Fh
+ 306: 1047+10 0516 D21E05 jnc dspDot ;non printable, show '.'
+ 307:
+ 308: 1057+7 0519 FE20 cpi ' ' ;displayable character?
+ 309: 1064+10 051B D22005 jnc dspAsc ;yes, go display it
+ 310:
+ 311: 1074+7 051E 3E2E dspDot mvi a,'.' ;display '.' instead
+ 312:
+ 313: 1081+17 0520 CD4807 dspAsc call ptcn ;display the character
+ 314: 1098+17 0523 CDEA07 call bmp ;increment hl, possibly de
+ 315: 1115+5 0526 0D dcr c ;decrement line byte count
+ 316: 1120+10 0527 C21305 jnz dmpAsc ;loop until 16 bytes done
+ 317:
+ 318: 1130+17 052A CDEA07 call bmp ;done?
+ 319: 1147+5+6 052D C8 rz ;yes
+ 320: 1152+5 052E 2B dcx h ;undo extra bump of hl
+ 321: 1157+10 052F C3FB04 jmp dmpLine ;do another line
+ 322:
+ 323: ;--------------------------------------------------------------------------
+ 324: ; pgm (P) - program memory
+ 325: ;--------------------------------------------------------------------------
+ 326: 1167+17 0532 CDA507 pgm call dspMsg
+ 327: - 0535 5047CD db 'PG','M'+80h
+ 328:
+ 329: 1184+17 0538 CD2007 call ahex ;read address
+ 330: 1201+5 053B EB xchg
+ 331: 1206+17 053C CD6307 call crlf
+ 332:
+ 333: 1223+7 053F 7E pglp mov a,m ;read memory
+ 334: 1230+17 0540 CD7907 call pt2 ;print 2 digits
+ 335: 1247+7 0543 3E2D mvi a,'-' ;load dash
+ 336: 1254+17 0545 CD4807 call ptcn ;print dash
+ 337:
+ 338: 1271+17 0548 CDB307 crig call rdcn ;get user input
+ 339: 1288+7 054B FE20 cpi ' ' ;space
+ 340: 1295+10 054D CA6505 jz con2 ;skip if space
+ 341: 1305+7 0550 FE0D cpi CR ;skip if CR
+ 342: 1312+10 0552 C25B05 jnz con1
+ 343: 1322+17 0555 CD6307 call crlf ;print CR,LF
+ 344: 1339+10 0558 C34805 jmp crig ;back for more
+ 345:
+ 346: 1349+5 055B EB con1 xchg ;HL->DE
+ 347: 1354+10 055C 210000 lxi h,0 ;get 16 bit zero
+ 348: 1364+7 055F 0E02 mvi c,2 ;count 2 digits
+ 349: 1371+17 0561 CD2807 call ahexNr ;convert to hex (no read)
+ 350: 1388+7 0564 73 mov m,e
+ 351: 1395+5 0565 23 con2 inx h
+ 352: 1400+10 0566 C33F05 jmp pglp
+ 353:
+ 354: ;--------------------------------------------------------------------------
+ 355: ; fill (K) - fill memory with a constant
+ 356: ;--------------------------------------------------------------------------
+ 357: 1410+17 0569 CDA507 fill call dspMsg
+ 358: - 056C 46494CCC db 'FIL','L'+80h
+ 359:
+ 360: 1427+17 0570 CD1D07 call tahex ;read addresses
+ 361: 1444+11 0573 E5 push h ;start addr on stack
+ 362: 1455+7 0574 0E02 mvi c,2 ;reading 2 digits
+ 363: 1462+17 0576 CD2207 call ahe0 ;input fill byte
+ 364: 1479+5 0579 EB xchg ;byte to write from e to l
+ 365: 1484+18 057A E3 xthl ;hl=start addr, stack=fill byte
+ 366: 1502+10 057B C1 pop b ;c=fill byte from stack
+ 367:
+ 368: 1512+7 057C 71 zloop mov m,c ;write into memory
+ 369: 1519+17 057D CDEA07 call bmp ;compare address, increment h
+ 370: 1536+5+6 0580 C8 rz
+ 371: 1541+10 0581 C37C05 jmp zloop
+ 372:
+ 373: ;--------------------------------------------------------------------------
+ 374: ; moveb (M) - move a block of memory
+ 375: ; exchg (E) - exhange block of memory
+ 376: ;--------------------------------------------------------------------------
+ 377: 1551+17 0584 CDA507 moveb call dspMsg
+ 378: - 0587 4D4F56C5 db 'MOV','E'+80h
+ 379: 1568+4 058B AF xra a ;a=0 means "move" command
+ 380: 1572+10 058C C39605 jmp doMove
+ 381:
+ 382: 1582+17 058F CDA507 exchg call dspMsg
+ 383: - 0592 455843C8 db 'EXC','H'+80h
+ 384: ;a returned <> 0 means "exchange" command
+ 385:
+ 386: 1599+5 0596 47 doMove mov b,a ;save move/exchange flag in b
+ 387: 1604+17 0597 CD1D07 call tahex ;read addresses
+ 388: 1621+11 059A E5 push h
+ 389: 1632+17 059B CD2007 call ahex
+ 390: 1649+5 059E EB xchg
+ 391: 1654+18 059F E3 xthl ;HL->start, DE->end, stack has dest
+ 392:
+ 393: 1672+7 05A0 4E mloop mov c,m ;c=byte from source
+ 394: 1679+18 05A1 E3 xthl ;hl->destination
+ 395:
+ 396: 1697+5 05A2 78 mov a,b ;move or exchange?
+ 397: 1702+4 05A3 B7 ora a
+ 398: 1706+10 05A4 CAAB05 jz nexch ;0 means move only
+ 399:
+ 400: 1716+7 05A7 7E mov a,m ;a=from destination
+ 401: 1723+18 05A8 E3 xthl ;hl->source
+ 402: 1741+7 05A9 77 mov m,a ;move destination to source
+ 403: 1748+18 05AA E3 xthl ;hl->destination
+ 404:
+ 405: 1766+7 05AB 71 nexch mov m,c ;move source to destination
+ 406: 1773+5 05AC 23 inx h ;increment destination
+ 407: 1778+18 05AD E3 xthl ;hl->source
+ 408: 1796+17 05AE CDEA07 call bmp ;increment source and compare to end
+ 409: 1813+10 05B1 C2A005 jnz mloop
+ 410:
+ 411: 1823+10 05B4 E1 pop h ;remove temp pointer from stack
+ 412: 1833+10 05B5 C9 ret ;and exit
+ 413:
+ 414: ;--------------------------------------------------------------------------
+ 415: ; ndmt (N or R) - non destructive memory test (size RAM)
+ 416: ;--------------------------------------------------------------------------
+ 417: 1843+17 05B6 CDA507 ndmt call dspMsg
+ 418: - 05B9 52414D54 db 'RAMTO','P'+80h
+ 4FD0
+ 419:
+ 420: 1860+10 05BF 21FFFF lxi h,0ffffh ;start at zero
+ 421:
+ 422: 1870+5 05C2 23 ndlop inx h
+ 423: 1875+7 05C3 7E mov a,m ;read from address in hl
+ 424: 1882+5 05C4 47 mov b,a ;save original value in b
+ 425: 1887+4 05C5 2F cma ;form and write inverted value
+ 426: 1891+7 05C6 77 mov m,a
+ 427: 1898+7 05C7 BE cmp m ;read and compare
+ 428: 1905+7 05C8 70 mov m,b ;restore original value
+ 429: 1912+10 05C9 CAC205 jz ndlop ;keep going if still RAM
+ 430:
+ 431: 1922+10 05CC C36D07 jmp err ;display end of RAM
+ 432:
+ 433: ;--------------------------------------------------------------------------
+ 434: ; compr (C) - compare two blocks of memory
+ 435: ;--------------------------------------------------------------------------
+ 436: 1932+17 05CF CDA507 compr call dspMsg
+ 437: - 05D2 434F4DD0 db 'COM','P'+80h
+ 438:
+ 439: 1949+17 05D6 CD1D07 call tahex ;read addresses
+ 440: 1966+11 05D9 E5 push h ;source start on stack
+ 441: 1977+17 05DA CD2007 call ahex
+ 442: 1994+5 05DD EB xchg ;de=source end, hl=compare start
+ 443:
+ 444: 1999+7 05DE 7E vmlop mov a,m ;a=compare byte
+ 445: 2006+5 05DF 23 inx h
+ 446: 2011+18 05E0 E3 xthl ;hl->source byte
+ 447: 2029+7 05E1 BE cmp m ;same?
+ 448: 2036+7 05E2 46 mov b,m ;b=source byte
+ 449: 2043+11+6 05E3 C46D07 cnz err ;display the error
+ 450: 2054+17 05E6 CDEA07 call bmp ;increment pointers
+ 451: 2071+18 05E9 E3 xthl ;hl->compare byte
+ 452: 2089+10 05EA C2DE05 jnz vmlop
+ 453:
+ 454: 2099+10 05ED E1 pop h ;remove temp pointer from stack
+ 455: 2109+10 05EE C9 ret ;and exit
+ 456:
+ 457: ;--------------------------------------------------------------------------
+ 458: ; srch1 (S) - search for one byte
+ 459: ; srch2 (F) - search for two bytes
+ 460: ;--------------------------------------------------------------------------
+ 461: 2119+17 05EF CDA507 srch1 call dspMsg
+ 462: - 05F2 46494E44 db 'FIND','1'+80h
+ B1
+ 463: 2136+4 05F7 AF xra a ;zero flag means one byte search
+ 464: 2140+10 05F8 C30306 jmp doSrch
+ 465:
+ 466: 2150+17 05FB CDA507 srch2 call dspMsg
+ 467: - 05FE 46494E44 db 'FIND','2'+80h
+ B2
+ 468: ;a returned <> 0 means two byte search
+ 469:
+ 470: 2167+11 0603 F5 doSrch push psw ;save 1/2 byte flag on stack
+ 471: 2178+17 0604 CD1D07 call tahex
+ 472:
+ 473: 2195+11 0607 E5 push h ;save h, getting 1st byte to find
+ 474: 2206+7 0608 0E02 mvi c,2 ;reading 2 hex digits
+ 475: 2213+17 060A CD2207 call ahe0 ;
+ 476: 2230+5 060D EB xchg ;h=code, d=f
+ 477: 2235+5 060E 45 mov b,l ;put code in b
+ 478: 2240+10 060F E1 pop h ;restore h
+ 479:
+ 480: 2250+10 0610 F1 pop psw ;a=one/two byte flag
+ 481: 2260+4 0611 B7 ora a ;zero true if one byte search
+ 482: 2264+11 0612 F5 push psw
+ 483: 2275+10 0613 CA1F06 jz cont
+ 484:
+ 485: 2285+11 0616 E5 push h ;save h, getting 2nd byte to find
+ 486: 2296+7 0617 0E02 mvi c,2
+ 487: 2303+17 0619 CD2207 call ahe0
+ 488: 2320+5 061C EB xchg
+ 489: 2325+5 061D 4D mov c,l
+ 490: 2330+10 061E E1 pop h
+ 491:
+ 492: 2340+7 061F 7E cont mov a,m ;read memory
+ 493: 2347+4 0620 B8 cmp b ;compare to code
+ 494: 2351+10 0621 C23706 jnz skp ;skip if no compare
+ 495:
+ 496: 2361+10 0624 F1 pop psw ;a=one/two byte flag
+ 497: 2371+4 0625 B7 ora a ;zero true if one byte serach
+ 498: 2375+11 0626 F5 push psw
+ 499: 2386+10 0627 CA3106 jz obcp
+ 500:
+ 501: 2396+5 062A 23 inx h ;two byte search
+ 502: 2401+7 062B 7E mov a,m
+ 503: 2408+5 062C 2B dcx h
+ 504: 2413+4 062D B9 cmp c
+ 505: 2417+10 062E C23706 jnz skp
+ 506:
+ 507: 2427+5 0631 23 obcp inx h
+ 508: 2432+7 0632 7E mov a,m ;read next byte
+ 509: 2439+5 0633 2B dcx h ;decr address
+ 510: 2444+17 0634 CD6D07 call err ;print data found
+ 511:
+ 512: 2461+17 0637 CDEA07 skp call bmp ;check if done
+ 513: 2478+10 063A C21F06 jnz cont ;back for more
+ 514: 2488+10 063D F1 pop psw ;remove flag saved on stack
+ 515: 2498+10 063E C9 ret
+ 516:
+ 517: ;--------------------------------------------------------------------------
+ 518: ; poutp (O) - output data to a port
+ 519: ;--------------------------------------------------------------------------
+ 520: 2508+17 063F CDA507 poutp call dspMsg
+ 521: - 0642 4F55D4 db 'OU','T'+80h
+ 522:
+ 523: 2525+7 0645 0E02 mvi c,2
+ 524: 2532+17 0647 CD2207 call ahe0 ;port number in e
+ 525:
+ 526: 2549+7 064A 0E02 mvi c,2
+ 527: 2556+17 064C CD2207 call ahe0 ;port to l, data in e
+ 528:
+ 529: 2573+5 064F 55 mov d,l ;d=port
+ 530: 2578+10 0650 21CFFF lxi h,SPTR-30h ;form OUT nn, RET in memory at h
+ 531: 2588+10 0653 36C9 mvi m,0c9h ;RET opcode
+ 532: 2598+5 0655 2B dcx h
+ 533: 2603+7 0656 72 mov m,d ;output port for OUT instruction
+ 534: 2610+5 0657 2B dcx h
+ 535: 2615+10 0658 36D3 mvi m,0D3H ;OUT opcode
+ 536: 2625+5 065A 7B mov a,e
+ 537: 2630+5 065B E9 pchl ;call OUT, RET
+ 538:
+ 539: ;--------------------------------------------------------------------------
+ 540: ; pinpt (I) - input data from a port
+ 541: ;--------------------------------------------------------------------------
+ 542: 2635+17 065C CDA507 pinpt call dspMsg
+ 543: - 065F 49CE db 'I','N'+80h
+ 544:
+ 545: 2652+7 0661 0E02 mvi c,2
+ 546: 2659+17 0663 CD2207 call ahe0 ;port number to e
+ 547:
+ 548: 2676+10 0666 21CFFF lxi h,SPTR-30H ;form IN nn, RET in memory at h
+ 549: 2686+10 0669 36C9 mvi m,0C9H ;RET opcode
+ 550: 2696+5 066B 2B dcx h
+ 551: 2701+7 066C 73 mov m,e ;input port of IN instruction
+ 552: 2708+5 066D 2B dcx h
+ 553: 2713+10 066E 36DB mvi m,0DBH ;IN opcode
+ 554: 2723+17 0670 CDCDFF call SPTR-32H
+ 555: 2740+10 0673 C37907 jmp pt2
+ 556:
+ 557: ;---------------------------------------------------------------------
+ 558: ; hexLoad (H or L) - load intel hex through 2SIO serial port 0 or 1
+ 559: ;---------------------------------------------------------------------
+ 560: 2750+17 0676 CDA507 hexload call dspMsg
+ 561: - 0679 4845584C db 'HEXLOA','D'+80h
+ 4F41C4
+ 562:
+ 563: 2767+7 0680 0E01 mvi c,1 ;read one hex digit
+ 564: 2774+17 0682 CD2207 call ahe0 ;digit is in e
+ 565: 2791+10 0685 21DFFF lxi h,SIOPORT ;hl->location on stack to save port
+ 566: 2801+7 0688 73 mov m,e ;SIOPORT = 0 or 1
+ 567:
+ 568: ; rcvLine - receive a hex file line
+ 569:
+ 570: 2808+17 0689 CD6307 rcvLine call crlf
+ 571: 2825+7 068C 0E00 mvi c,0 ;clear echo character flag
+ 572:
+ 573: 2832+17 068E CDF306 wtMark call getChar ;read next character
+ 574: 2849+7 0691 D63A sui ':' ;record marker?
+ 575: 2856+10 0693 C28E06 jnz wtMark ;no, keep looking
+ 576:
+ 577: ; Have start of new record. Save the byte count and load address.
+ 578: ; The load address is echoed to the screen so the user can
+ 579: ; see the file load progress.
+ 580:
+ 581: 2866+5 0696 57 mov d,a ;init checksum in D to zero
+ 582:
+ 583: 2871+17 0697 CDD506 call iByte ;input two hex digits (byte count)
+ 584: 2888+5 069A 7B mov a,e ;test for zero byte count
+ 585: 2893+4 069B B7 ora a
+ 586: 2897+10 069C CAC306 jz flush ;count of 0 means end
+ 587:
+ 588: 2907+5 069F 43 mov b,e ;B = byte count on line
+ 589:
+ 590: 2912+5 06A0 0C inr c ;set echo flag for address bytes
+ 591: 2917+17 06A1 CDD506 call iByte ;get MSB of address
+ 592: 2934+5 06A4 63 mov h,e ;H = address MSB
+ 593: 2939+17 06A5 CDD506 call iByte ;get LSB of address
+ 594: 2956+5 06A8 6B mov l,e ;L = address LSB
+ 595: 2961+5 06A9 0D dcr c ;clear echo flag
+ 596:
+ 597: 2966+17 06AA CDD506 call iByte ;ignore/discard record type
+ 598:
+ 599: ; Receive the data bytes of the record and move to memory
+ 600:
+ 601: 2983+17 06AD CDD506 data call iByte ;read a data byte (2 hex digits)
+ 602: 3000+7 06B0 73 mov m,e ;store in memory
+ 603: 3007+5 06B1 23 inx h
+ 604: 3012+5 06B2 05 dcr b
+ 605: 3017+10 06B3 C2AD06 jnz data
+ 606:
+ 607: ; Validate checksum
+ 608:
+ 609: 3027+17 06B6 CDD506 call iByte ;read and add checksum
+ 610: 3044+10 06B9 CA8906 jz rcvLine ;checksum good, receive next line
+ 611:
+ 612: 3054+17 06BC CDA507 call dspMsg ;display error message
+ 613: - 06BF 204552D2 db ' ER','R'+80h
+ 614: ;fall into flush
+ 615:
+ 616: ; flush - flush rest of file as it comes in until no characters
+ 617: ; received for about 1/4 second to prevent incoming file
+ 618: ; data looking like typed monitor commands. Only the console
+ 619: ; port needs to be flushed.
+ 620:
+ 621: 3071+10 06C3 DB11 flush in COND ;clear possible received char
+ 622: 3081+10 06C5 11B128 lxi d,10417 ;.25s timeout for 48 cycle loop
+ 623:
+ 624: 3091+10 06C8 DB10 flshLp in CONS ;(10) look for character on console
+ 625: 3101+4 06CA 0F rrc ;(4) data flag in carry
+ 626: 3105+10 06CB DAC306 jc flush ;(10) data received, restart
+ 627:
+ 628: 3115+5 06CE 1B dcx d ;(5) decrement timeout
+ 629: 3120+5 06CF 7A mov a,d ;(5)
+ 630: 3125+4 06D0 B3 ora e ;(4)
+ 631: 3129+10 06D1 C2C806 jnz flshLp ;(10) loop until zero
+ 632: 3139+10 06D4 C9 ret ;done
+ 633:
+ 634: ;-----------------------------------------------------------
+ 635: ; iByte - read two ascii hex bytes and return binary
+ 636: ; value in e.
+ 637: ;-----------------------------------------------------------
+ 638: 3149+17 06D5 CDF306 iByte call getChar ;get a character
+ 639: 3166+17 06D8 CDEB06 call asc2Bin ;ascii hex digit to binary
+ 640: 3183+4 06DB 87 add a ;put in msn, zero lsn
+ 641: 3187+4 06DC 87 add a
+ 642: 3191+4 06DD 87 add a
+ 643: 3195+4 06DE 87 add a
+ 644: 3199+5 06DF 5F mov e,a ;save byte with MSN in E
+ 645:
+ 646: ; 2nd byte (LSN)
+ 647:
+ 648: 3204+17 06E0 CDF306 call getChar ;get a character
+ 649: 3221+17 06E3 CDEB06 call asc2Bin ;ascii hex digit to binary
+ 650: 3238+4 06E6 83 add e ;combine msn and lsn
+ 651: 3242+5 06E7 5F mov e,a ;save in EH
+ 652: 3247+4 06E8 82 add d ;add character to checksum
+ 653: 3251+5 06E9 57 mov d,a
+ 654: 3256+10 06EA C9 ret
+ 655:
+ 656: ;-------------------------------------------------------------
+ 657: ; asc2Bin - ASCII hex digit to binary conversion. Digit
+ 658: ; passed in a, returned in a. Errors ignored as checksum
+ 659: ; will eventually kick this out.
+ 660: ;-------------------------------------------------------------
+ 661: 3266+7 06EB D630 asc2Bin sui '0' ;'0' to 0
+ 662: 3273+7 06ED FE0A cpi 10 ;0-9 ?
+ 663: 3280+5+6 06EF D8 rc
+ 664:
+ 665: 3285+7 06F0 D607 sui 7 ;'A-F' to A-F
+ 666: 3292+10 06F2 C9 ret
+ 667:
+ 668: ;-------------------------------------------------------------
+ 669: ; getChar - read a character from the 2SIO port specified in
+ 670: ; SIOPORT. The character is also echoed to the console port
+ 671: ; if the echo flag (c) is set (non-zero)
+ 672: ;-------------------------------------------------------------
+ 673: 3302+11 06F3 C5 getChar push b ;save b,c
+ 674: 3313+13 06F4 3ADFFF lda SIOPORT ;a=pseudo port to use
+ 675: 3326+4 06F7 B7 ora a ;port zero?
+ 676: 3330+10 06F8 C20407 jnz inWait1 ;no, use port 1
+ 677:
+ 678: ; in through 1st port (0) on 2SIO
+ 679:
+ 680: 3340+17 06FB CDD607 inWait0 call cntlc ;test for character from console
+ 681: 3357+10 06FE CAFB06 jz inWait0
+ 682: 3367+10 0701 C30F07 jmp haveChr
+ 683:
+ 684: ; in through 2nd port (1) on 2SIO, check for ctrl-c on console
+ 685: ; while waiting
+ 686:
+ 687: 3377+17 0704 CDD607 inWait1 call cntlc ;look for ctrl-c on console
+ 688: 3394+10 0707 DB12 in CONS+2 ;wait for character on 2nd 2SIO
+ 689: 3404+4 0709 0F rrc ;data flag in carry
+ 690: 3408+10 070A D20407 jnc inWait1
+ 691: 3418+10 070D DB13 in COND+2 ;a=character read
+ 692:
+ 693: ; process new character in a. Echo to console if c is non-zero
+ 694:
+ 695: 3428+5 070F 47 haveChr mov b,a ;save character in b
+ 696: 3433+5 0710 79 mov a,c ;echo flag (c) set?
+ 697: 3438+4 0711 B7 ora a
+ 698: 3442+10 0712 CA1A07 jz noEcho ;no echo
+ 699:
+ 700: 3452+5 0715 78 mov a,b ;a=character to send
+ 701: 3457+10 0716 C1 pop b ;restore b,c
+ 702: 3467+10 0717 C34807 jmp ptcn ;display character and exit
+ 703:
+ 704: 3477+5 071A 78 noEcho mov a,b ;a=byte read
+ 705: 3482+10 071B C1 pop b ;restore b,c
+ 706: 3492+10 071C C9 ret
+ 707:
+ 708: ;********************************************************************
+ 709: ;
+ 710: ; Type conversion, input, output subroutines
+ 711: ;
+ 712: ;********************************************************************
+ 713:
+ 714: ;------------------------------------------------------------
+ 715: ; tahex - read two 16 bit addresses. 1st returned in HL, 2nd in DE
+ 716: ;------------------------------------------------------------
+ 717: 3502+17 071D CD2007 tahex call ahex ;get first address param
+ 718: ;fall into ahex to get 2nd param
+ 719:
+ 720: ;------------------------------------------------------------
+ 721: ; ahex - read up to 4 hex digits to binary, return in de
+ 722: ;------------------------------------------------------------
+ 723: 3519+7 0720 0E04 ahex mvi c,4 ;count of 4 digits
+ 724: 3526+10 0722 210000 ahe0 lxi h,0 ;16 bit zero
+ 725: 3536+17 0725 CDB307 ahe1 call rdcn ;read a byte
+ 726: 3553+7 0728 FE30 ahexNr cpi '0'
+ 727: 3560+10 072A DA1F04 jc start ;below '0', abort
+ 728: 3570+7 072D FE3A cpi ':'
+ 729: 3577+11+6 072F D45607 cnc alph
+ 730: 3588+10 0732 29 dad h
+ 731: 3598+10 0733 29 dad h
+ 732: 3608+10 0734 29 dad h
+ 733: 3618+10 0735 29 dad h
+ 734: 3628+7 0736 D630 sui '0' ;ascii bias
+ 735: 3635+7 0738 FE0A cpi 10 ;digit 0-10
+ 736: 3642+10 073A DA3F07 jc alf
+ 737: 3652+7 073D D607 sui 7 ;alpha bias
+ 738: 3659+4 073F 85 alf add l
+ 739: 3663+5 0740 6F mov l,a
+ 740: 3668+5 0741 0D dcr c
+ 741: 3673+10 0742 C22507 jnz ahe1 ;keep reading
+ 742: 3683+5 0745 EB xchg ;result in de
+ 743: ;fall through to print a space
+ 744: ;------------------------------------------------------------
+ 745: ; spce - print a space
+ 746: ; ptcn - print character passed in a
+ 747: ;------------------------------------------------------------
+ 748: 3688+7 0746 3E20 spce mvi a,' ' ;print space
+ 749: 3695+11 0748 F5 ptcn push psw
+ 750:
+ 751: 3706+10 0749 DB10 ptlop in CONS ;wait for OK to transmit
+ 752: 3716+7 074B E602 ani TBE
+ 753: 3723+10 074D CA4907 jz ptlop
+ 754:
+ 755: 3733+10 0750 F1 pop psw ;recover a
+ 756: 3743+7 0751 E67F ani 07fh ;get rid of msbit
+ 757: 3750+10 0753 D311 out COND ;and print it
+ 758: 3760+10 0755 C9 ret ;return from ptcn
+ 759:
+ 760: ;------------------------------------------------------------
+ 761: ; alph - verify valid hex digit, abort to command loop if not
+ 762: ;------------------------------------------------------------
+ 763: 3770+7 0756 FE41 alph cpi 'A'
+ 764: 3777+10 0758 DA1F04 jc start
+ 765: 3787+7 075B E65F ani 05fh
+ 766: 3794+7 075D FE47 cpi 'G'
+ 767: 3801+10 075F D21F04 jnc start
+ 768: 3811+10 0762 C9 ret
+ 769:
+ 770: ;------------------------------------------------------------
+ 771: ; crlf - print CR/LF
+ 772: ;------------------------------------------------------------
+ 773: 3821+7 0763 3E0D crlf mvi a,CR
+ 774: 3828+17 0765 CD4807 call ptcn
+ 775: 3845+7 0768 3E0A mvi a,LF
+ 776: 3852+10 076A C34807 jmp ptcn
+ 777:
+ 778: ;------------------------------------------------------------
+ 779: ; err - display the address in hl followed by the value
+ 780: ; in b, then the value in a.
+ 781: ;------------------------------------------------------------
+ 782: 3862+11 076D F5 err push psw ;save A
+ 783: 3873+17 076E CD8107 call ptad ;print address
+ 784: 3890+5 0771 78 mov a,b ;print B
+ 785: 3895+17 0772 CD7907 call pt2
+ 786: 3912+17 0775 CD4607 call spce
+ 787: 3929+10 0778 F1 pop psw ;print A
+ 788: 3939+11 0779 F5 pt2 push psw
+ 789: 3950+17 077A CD9307 call binh
+ 790: 3967+10 077D F1 pop psw
+ 791: 3977+10 077E C39707 jmp binl
+ 792:
+ 793: ;------------------------------------------------------------
+ 794: ; ptad - display the address in h
+ 795: ;------------------------------------------------------------
+ 796: 3987+17 0781 CD6307 ptad call crlf ;print cr,lf
+ 797: 4004+17 0784 CDC707 call pause
+ 798: 4021+5 0787 7C mov a,h ;print
+ 799: 4026+17 0788 CD7907 call pt2 ;ascii
+ 800: 4043+5 078B 7D mov a,l ;codes
+ 801: 4048+17 078C CD7907 call pt2 ;for
+ 802: 4065+17 078F CD4607 call spce ;address
+ 803: 4082+10 0792 C9 ret
+ 804:
+ 805: ;------------------------------------------------------------
+ 806: ; binh - print MSN of byte passed in A
+ 807: ; binl - print LSN of byte passed in A
+ 808: ;------------------------------------------------------------
+ 809: 4092+4 0793 1F binh rar
+ 810: 4096+4 0794 1F rar
+ 811: 4100+4 0795 1F rar
+ 812: 4104+4 0796 1F rar
+ 813: 4108+7 0797 E60F binl ani 0fh ;low 4 bits
+ 814: 4115+7 0799 C630 adi '0' ;ascii bias
+ 815: 4122+7 079B FE3A cpi 03ah ;digit 0-9
+ 816: 4129+10 079D DA4807 jc ptcn
+ 817: 4139+7 07A0 C607 adi 7 ;digit A-F
+ 818: 4146+10 07A2 C34807 jmp ptcn
+ 819:
+ 820: ;------------------------------------------------------------
+ 821: ; dspMsg - display in-line message. String terminated by byte
+ 822: ; with msbit set.
+ 823: ;------------------------------------------------------------
+ 824: 4156+10 07A5 E1 dspMsg pop h ;hl->string to display
+ 825:
+ 826: 4166+7 07A6 7E dspLoop mov a,m ;a=next character to display
+ 827: 4173+17 07A7 CD4807 call ptcn ;display character
+ 828: 4190+7 07AA B6 ora m ;MSB set? (last byte)
+ 829: 4197+5 07AB 23 inx h ;point to next character
+ 830: 4202+10 07AC F2A607 jp dspLoop ;no, keep looping
+ 831:
+ 832: 4212+17 07AF CD4607 call spce ;display a trailing space
+ 833: 4229+5 07B2 E9 pchl ;return past the string
+ 834:
+ 835: ;------------------------------------------------------------
+ 836: ; rdcn - read from console to A with echo to screen
+ 837: ; getCon - read from console to A without echo
+ 838: ;------------------------------------------------------------
+ 839: 4234+17 07B3 CDBC07 rdcn call getCon ;get character from console
+ 840: 4251+7 07B6 FE1B cpi ESC ;ESC confuses smart terminals
+ 841: 4258+5+6 07B8 C8 rz ; so don't echo escape
+ 842: 4263+10 07B9 C34807 jmp ptcn ;echo onto printer
+ 843:
+ 844: 4273+10 07BC DB10 getCon in CONS ;read keyboard status
+ 845: 4283+4 07BE 0F rrc ;data available flag in carry
+ 846: 4287+10 07BF D2BC07 jnc getCon
+ 847:
+ 848: 4297+10 07C2 DB11 in COND ;read from keyboard
+ 849: 4307+7 07C4 E67F ani 07fh ;strip off msb
+ 850: 4314+10 07C6 C9 ret
+ 851:
+ 852: ;------------------------------------------------------------
+ 853: ; pause - pause/resume with spacebar. Also look for a ctrl-c
+ 854: ; or ESC to abort.
+ 855: ;------------------------------------------------------------
+ 856: 4324+17 07C7 CDD607 pause call cntlc ;look for abort or other character
+ 857: 4341+7 07CA FE20 cpi ' '
+ 858: 4348+5+6 07CC C0 rnz ;return if not space or abort
+ 859:
+ 860: 4353+17 07CD CDD607 ploop call cntlc ;loop here until space or abort pressed
+ 861: 4370+7 07D0 FE20 cpi ' '
+ 862: 4377+10 07D2 C2CD07 jnz ploop
+ 863: 4387+10 07D5 C9 ret
+ 864:
+ 865: ;------------------------------------------------------------
+ 866: ; cntlc - see if a character has been typed. If not, return
+ 867: ; zero true. If ctrl-c or ESC typed, abort and return to
+ 868: ; the command loop. Otherwise, return the character typed.
+ 869: ;------------------------------------------------------------
+ 870: 4397+10 07D6 DB10 cntlc in CONS ;anything typed?
+ 871: 4407+7 07D8 E601 ani RDA
+ 872: 4414+5+6 07DA C8 rz ;no, exit with zero true
+ 873:
+ 874: 4419+10 07DB DB11 in COND ;get the typed character
+ 875: 4429+7 07DD E67F ani 07fh
+ 876: 4436+7 07DF FE03 cpi CTRLC ;abort with ctrl-c (2.0 style)
+ 877: 4443+10 07E1 CA1F04 jz start
+ 878: 4453+7 07E4 FE1B cpi ESC ;or ESC (4.x style)
+ 879: 4460+10 07E6 CA1F04 jz start
+ 880: 4470+10 07E9 C9 ret
+ 881:
+ 882: ;------------------------------------------------------------
+ 883: ; bmp - compare address and increment h. Return zero true
+ 884: ; if hl=de. Once hl=de, then de is incremented each time
+ 885: ; so the comparison remains true for subsequent calls.
+ 886: ;------------------------------------------------------------
+ 887: 4480+5 07EA 7B bmp mov a,e ;compare lsb's of hl,de
+ 888: 4485+4 07EB 95 sub l
+ 889: 4489+10 07EC C2F107 jnz goon ;not equal
+ 890:
+ 891: 4499+5 07EF 7A mov a,d ;compare msb's of hl,de
+ 892: 4504+4 07F0 9C sbb h ;gives zero true if equal
+ 893:
+ 894: 4508+5 07F1 23 goon inx h ;increment hl
+ 895: 4513+5+6 07F2 C0 rnz ;exit if hl <> de yet
+ 896:
+ 897: 4518+5 07F3 13 inx d ;increase de as well so it will
+ 898: 4523+10 07F4 C9 ret ; still be equal next time
+ 899:
+ 900: - 07F5 end
+
+
+
+Statistics:
+
+ 4 passes
+ 0 jr promotions
+ 94 symbols
+ 1013 bytes
+
+
+
+Symbol Table:
+
+ahe0 722
+ahe1 725
+ahex 720
+ahexnr 728
+alf 73f
+alph 756
+asc2bin 6eb
+binh 793
+binl 797
+bmp 7ea
+boot =ff00
+chksum 480
+cmdtbl 444
+cntlc 7d6
+compr 5cf
+con1 55b
+con2 565
+cond = 11
+cons = 10
+cont 61f
+cr = d
+crig 548
+crlf 763
+csloop 48c
+ctrlc = 3
+cycl 4a6
+data 6ad
+disp 4f1
+dmpasc 513
+dmphex 501
+dmpline 4fb
+doboot 476
+domove 596
+dosrch 603
+dspasc 520
+dspdot 51e
+dsploop 7a6
+dspmsg 7a5
+err 76d
+esc = 1b
+exchg 58f
+exec 46a
+fill 569
+flshlp 6c8
+flush 6c3
+getchar 6f3
+getcon 7bc
+goon 7f1
+havechr 70f
+hexload 676
+ibyte 6d5
+inwait0 6fb
+inwait1 704
+lf = a
+mloop 5a0
+monit 400
+moveb 584
+ndlop 5c2
+ndmt 5b6
+nexch 5ab
+noecho 71a
+obcp 631
+pause 7c7
+peve 4ea
+pglp 53f
+pgm 532
+pinpt 65c
+ploop 7cd
+poutp 63f
+pt2 779
+ptad 781
+ptcn 748
+ptlop 749
+rcvline 689
+rda = 1
+rdcn 7b3
+rlop 4c6
+rndm 4e2
+sioport =ffdf
+skiprd 4d4
+skipwr 4bb
+skp 637
+spce 746
+sptr =ffff
+srch1 5ef
+srch2 5fb
+start 41f
+tahex 71d
+tbe = 2
+tlop 4b1
+tmem 499
+vmlop 5de
+wtmark 68e
+zloop 57c
+
\ No newline at end of file
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.lst
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.tap
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.tap
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.tap (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.tap (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/altmon.tap
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.ams
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.ams
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.ams (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.ams (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.ams
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.bds
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.bds (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.bds (revision 3)
@@ -0,0 +1,541 @@
+binary-debuggable-source
+0000 0000 f boot.asm
+0000 0000 s ;--------------------------------------------------------------------------
+0000 0000 s ; Simple test program for Sys9080 project https://github.com/zpekic/sys9080
+0000 0000 s ; (c) zpekic@hotmail.com - 2017, 2018
+0000 0000 s ;--------------------------------------------------------------------------
+0000 0000 s ACIA0_STATUS EQU 0x10; status read-only
+0000 0000 s ACIA0_DATA EQU 0x11; data send/receive
+0000 0000 s ACIA1_STATUS EQU 0x12; status read-only
+0000 0000 s ACIA1_DATA EQU 0x13; data send/receive
+0000 0000 s PORT_0 EQU 0x00;
+0000 0000 s PORT_1 EQU 0x01;
+0000 0000 s MASK_VALID EQU 0x01; fields in UART status register
+0000 0000 s MASK_READY EQU 0x02;
+0000 0000 s MASK_ERROR EQU 0x40;
+0000 0000 s MASK_INTREQ EQU 0x80;
+0000 0000 s CR EQU 0x0D; ASCII newline
+0000 0000 s LF EQU 0x0A; ASCII line feed
+0000 0000 s MASK_BUTTON1 EQU 0x02;
+0000 0000 s Temp_PC EQU 0xFF00; can't use DW because the hex file maps to ROM only
+0000 0000 s AltMon EQU 0x0400; Altmon is org'd to this location
+0000 0000 s
+0000 0000 s
+0000 0000 s ORG 0x0000 ;-----RST0 == RESET
+0000 0000 d f3
+0000 0000 s DI
+0001 0001 d c3ed00
+0001 0001 s JMP Boot
+0004 0004 s
+0008 0008 s ORG 0x0008 ;-----RST1 (not used)
+0008 0008 d f3
+0008 0008 s DI
+0009 0009 d c33900
+0009 0009 s JMP DumpState
+000c 000c s
+0010 0010 s ORG 0x0010 ;-----RST2 (not used)
+0010 0010 d f3
+0010 0010 s DI
+0011 0011 d c33900
+0011 0011 s JMP DumpState
+0014 0014 s
+0018 0018 s ORG 0x0018 ;-----RST3 (not used)
+0018 0018 d f3
+0018 0018 s DI
+0019 0019 d c33900
+0019 0019 s JMP DumpState
+001c 001c s
+0020 0020 s ORG 0x0020 ;-----RST4 (ACIA1)
+0020 0020 d f3
+0020 0020 s DI
+0021 0021 d c3ba00
+0021 0021 s JMP OnByteReceived
+0024 0024 s
+0028 0028 s ORG 0x0028 ;-----RST5 (ACIA0)
+0028 0028 d f3
+0028 0028 s DI
+0029 0029 d c3ba00
+0029 0029 s JMP OnByteReceived
+002c 002c s
+0030 0030 s ORG 0x0030 ;-----RST6 (BTN1)
+0030 0030 d fb
+0030 0030 s EI ;no interrupt servicing (used to control ACIA status)
+0031 0031 d c9
+0031 0031 s RET
+0032 0032 s
+0038 0038 s ORG 0x0038 ;-----RST7 (BTN0)
+0038 0038 d f3
+0038 0038 s DI
+0039 0039 d e3
+0039 0039 s DumpState: XTHL ;PC from stack is now in HL
+003a 003a d 2200ff
+003a 003a s SHLD Temp_PC ;store away (making this code non re-entrant)
+003d 003d d e3
+003d 003d s XTHL ;restore PC to stack
+003e 003e d e5
+003e 003e s PUSH H
+003f 003f d d5
+003f 003f s PUSH D
+0040 0040 d c5
+0040 0040 s PUSH B
+0041 0041 d f5
+0041 0041 s PUSH PSW
+0042 0042 s
+0042 0042 d e5
+0042 0042 s PUSH H
+0043 0043 d d5
+0043 0043 s PUSH D
+0044 0044 d c5
+0044 0044 s PUSH B
+0045 0045 d f5
+0045 0045 s PUSH PSW
+0046 0046 s
+0046 0046 d 219901
+0046 0046 s LXI H, TextAF
+0049 0049 d cd3a01
+0049 0049 s CALL TxStringAtHL
+004c 004c d e3
+004c 004c s XTHL
+004d 004d d cd5501
+004d 004d s CALL TxValueOfHL
+0050 0050 d e1
+0050 0050 s POP H
+0051 0051 s
+0051 0051 d 21a001
+0051 0051 s LXI H, TextBC
+0054 0054 d cd3a01
+0054 0054 s CALL TxStringAtHL
+0057 0057 d e3
+0057 0057 s XTHL
+0058 0058 d cd5501
+0058 0058 s CALL TxValueOfHL
+005b 005b d cd4401
+005b 005b s CALL BytesAtHL
+005e 005e d e1
+005e 005e s POP H
+005f 005f s
+005f 005f d 21a701
+005f 005f s LXI H, TextDE
+0062 0062 d cd3a01
+0062 0062 s CALL TxStringAtHL
+0065 0065 d e3
+0065 0065 s XTHL
+0066 0066 d cd5501
+0066 0066 s CALL TxValueOfHL
+0069 0069 d cd4401
+0069 0069 s CALL BytesAtHL
+006c 006c d e1
+006c 006c s POP H
+006d 006d s
+006d 006d d 21ae01
+006d 006d s LXI H, TextHL
+0070 0070 d cd3a01
+0070 0070 s CALL TxStringAtHL
+0073 0073 d e3
+0073 0073 s XTHL
+0074 0074 d cd5501
+0074 0074 s CALL TxValueOfHL
+0077 0077 d cd4401
+0077 0077 s CALL BytesAtHL
+007a 007a d e1
+007a 007a s POP H
+007b 007b s
+007b 007b d 21b501
+007b 007b s LXI H, TextPC
+007e 007e d cd3a01
+007e 007e s CALL TxStringAtHL
+0081 0081 d 2a00ff
+0081 0081 s LHLD Temp_PC
+0084 0084 d cd5501
+0084 0084 s CALL TxValueOfHL
+0087 0087 d cd4401
+0087 0087 s CALL BytesAtHL
+008a 008a s
+008a 008a d 21bc01
+008a 008a s LXI H, TextSP
+008d 008d d cd3a01
+008d 008d s CALL TxStringAtHL
+0090 0090 d 11ffff
+0090 0090 s LXI D, 0xFFFF ;start searching for stack position from top of memory down
+0093 0093 d 2a00ff
+0093 0093 s LHLD Temp_PC
+0096 0096 d eb
+0096 0096 s XCHG ;HL = 0xFFFF, DE = PC to search for
+0097 0097 d 7a
+0097 0097 s SearchForPC: MOV A, D
+0098 0098 d be
+0098 0098 s CMP M
+0099 0099 d c2b000
+0099 0099 s JNZ NotFound
+009c 009c d 2b
+009c 009c s DCX H
+009d 009d d 7b
+009d 009d s MOV A, E
+009e 009e d be
+009e 009e s CMP M
+009f 009f d c29700
+009f 009f s JNZ SearchForPC
+00a2 00a2 d cd5501
+00a2 00a2 s CALL TxValueOfHL
+00a5 00a5 d cd4401
+00a5 00a5 s CALL BytesAtHL
+00a8 00a8 d 3e0d
+00a8 00a8 s MVI A, CR
+00aa 00aa d cd7401
+00aa 00aa s CALL SendChar
+00ad 00ad d c3b400
+00ad 00ad s JMP RestoreRegs
+00b0 00b0 d 2b
+00b0 00b0 s NotFound: DCX H
+00b1 00b1 d c39700
+00b1 00b1 s JMP SearchForPC
+00b4 00b4 s
+00b4 00b4 d f1
+00b4 00b4 s RestoreRegs: POP PSW
+00b5 00b5 d c1
+00b5 00b5 s POP B
+00b6 00b6 d d1
+00b6 00b6 s POP D
+00b7 00b7 d e1
+00b7 00b7 s POP H
+00b8 00b8 d fb
+00b8 00b8 s EI
+00b9 00b9 d c9
+00b9 00b9 s RET
+00ba 00ba s
+00ba 00ba s ;-------------------------------------------
+00ba 00ba d f5
+00ba 00ba s OnByteReceived: PUSH PSW
+00bb 00bb d db01
+00bb 00bb s IN PORT_1 ;hooked up to 4 push buttons
+00bd 00bd d e602
+00bd 00bd s ANI MASK_BUTTON1
+00bf 00bf d caea00
+00bf 00bf s JZ ProcessByte
+00c2 00c2 d e5
+00c2 00c2 s PUSH H
+00c3 00c3 d d5
+00c3 00c3 s PUSH D
+00c4 00c4 d c5
+00c4 00c4 s PUSH B
+00c5 00c5 s
+00c5 00c5 d db12
+00c5 00c5 s IN ACIA1_STATUS
+00c7 00c7 d 67
+00c7 00c7 s MOV H, A
+00c8 00c8 d db13
+00c8 00c8 s IN ACIA1_DATA
+00ca 00ca d 6f
+00ca 00ca s MOV L, A
+00cb 00cb d e5
+00cb 00cb s PUSH H
+00cc 00cc s
+00cc 00cc d db10
+00cc 00cc s IN ACIA0_STATUS
+00ce 00ce d 67
+00ce 00ce s MOV H, A
+00cf 00cf d db11
+00cf 00cf s IN ACIA0_DATA
+00d1 00d1 d 6f
+00d1 00d1 s MOV L, A
+00d2 00d2 d e5
+00d2 00d2 s PUSH H
+00d3 00d3 s
+00d3 00d3 d 213702
+00d3 00d3 s LXI H, TextACIA0
+00d6 00d6 d cd3a01
+00d6 00d6 s CALL TxStringAtHL
+00d9 00d9 d e1
+00d9 00d9 s POP H
+00da 00da d cd5501
+00da 00da s CALL TxValueOfHL
+00dd 00dd s
+00dd 00dd d 215402
+00dd 00dd s LXI H, TextACIA1
+00e0 00e0 d cd3a01
+00e0 00e0 s CALL TxStringAtHL
+00e3 00e3 d e1
+00e3 00e3 s POP H
+00e4 00e4 d cd5501
+00e4 00e4 s CALL TxValueOfHL
+00e7 00e7 s
+00e7 00e7 d c1
+00e7 00e7 s POP B
+00e8 00e8 d d1
+00e8 00e8 s POP D
+00e9 00e9 d e1
+00e9 00e9 s POP H
+00ea 00ea d f1
+00ea 00ea s ProcessByte: POP PSW
+00eb 00eb d fb
+00eb 00eb s EI
+00ec 00ec d c9
+00ec 00ec s RET
+00ed 00ed s ;-------------------------------------------
+00ed 00ed d 210000
+00ed 00ed s Boot: LXI H, 0000H
+00f0 00f0 d 2b
+00f0 00f0 s DCX H
+00f1 00f1 d f9
+00f1 00f1 s SPHL
+00f2 00f2 d 21c301
+00f2 00f2 s LXI H, TextGreet1
+00f5 00f5 d cd3a01
+00f5 00f5 s CALL TxStringAtHL
+00f8 00f8 d cd8001
+00f8 00f8 s CALL GetLowestRam
+00fb 00fb d 7d
+00fb 00fb s MOV A, L
+00fc 00fc d d300
+00fc 00fc s OUT PORT_0
+00fe 00fe d 7c
+00fe 00fe s MOV A, H
+00ff 00ff d d301
+00ff 00ff s OUT PORT_1 ;display on LEDs
+0101 0101 d cd5501
+0101 0101 s CALL TxValueOfHL ;display on console
+0104 0104 d 21e901
+0104 0104 s LXI H, TextPort
+0107 0107 d cd3a01
+0107 0107 s CALL TxStringAtHL
+010a 010a d db00
+010a 010a s IN PORT_0
+010c 010c d 6f
+010c 010c s MOV L, A
+010d 010d d db01
+010d 010d s IN PORT_1
+010f 010f d 67
+010f 010f s MOV H, A
+0110 0110 d cd5501
+0110 0110 s CALL TxValueOfHL
+0113 0113 d 21f801
+0113 0113 s LXI H, TextGreet2
+0116 0116 d cd3a01
+0116 0116 s CALL TxStringAtHL
+0119 0119 d cd2001
+0119 0119 s CALL PrintAsciiSet
+011c 011c d fb
+011c 011c s EI
+011d 011d s ; HLT ;interrupt is needed to go further
+011d 011d s ;-------------------------------------------------------------------------
+011d 011d d c30004
+011d 011d s JMP AltMon ;enter monitor program
+0120 0120 s ;-------------------------------------------------------------------------
+0120 0120 d 01200d
+0120 0120 s PrintAsciiSet: LXI B, 0D20H ;set C to ASCII space
+0123 0123 d 79
+0123 0123 s SendNextChar: MOV A, C
+0124 0124 d cd7401
+0124 0124 s CALL SendChar ;send char
+0127 0127 d fe7e
+0127 0127 s CPI "~" ;end of printable chars reached?
+0129 0129 d ca3001
+0129 0129 s JZ NextLine
+012c 012c d 0c
+012c 012c s INR C
+012d 012d d c32301
+012d 012d s JMP SendNextChar
+0130 0130 d 78
+0130 0130 s NextLine: MOV A, B
+0131 0131 d cd7401
+0131 0131 s CALL SendChar ;send char
+0134 0134 d ee06
+0134 0134 s XRI 00000110B ;cheap trick to convert newline to linefeed
+0136 0136 d cd7401
+0136 0136 s CALL SendChar ;send char
+0139 0139 d c9
+0139 0139 s RET
+013a 013a s
+013a 013a d 7e
+013a 013a s TxStringAtHL: MOV A, M
+013b 013b d a7
+013b 013b s ANA A
+013c 013c d c8
+013c 013c s RZ
+013d 013d d cd7401
+013d 013d s CALL SendChar
+0140 0140 d 23
+0140 0140 s INX H
+0141 0141 d f23a01
+0141 0141 s JP TxStringAtHL
+0144 0144 s
+0144 0144 d 0e10
+0144 0144 s BytesAtHL: MVI C, 0x10 ;dump 16 bytes at (HL)
+0146 0146 d 3e20
+0146 0146 s NextByteAtHL: MVI A, " "
+0148 0148 d cd7401
+0148 0148 s CALL SendChar
+014b 014b d 7e
+014b 014b s MOV A, M
+014c 014c d cd5a01
+014c 014c s CALL TxValueOfA
+014f 014f d 0d
+014f 014f s DCR C
+0150 0150 d c8
+0150 0150 s RZ ;return if reached 0
+0151 0151 d 23
+0151 0151 s INX H
+0152 0152 d c34601
+0152 0152 s JMP NextByteAtHL
+0155 0155 s
+0155 0155 d 7c
+0155 0155 s TxValueOfHL: MOV A, H
+0156 0156 d cd5a01
+0156 0156 s CALL TxValueOfA
+0159 0159 d 7d
+0159 0159 s MOV A, L
+015a 015a d f5
+015a 015a s TxValueOfA: PUSH PSW
+015b 015b d 0f
+015b 015b s RRC
+015c 015c d 0f
+015c 015c s RRC
+015d 015d d 0f
+015d 015d s RRC
+015e 015e d 0f
+015e 015e s RRC
+015f 015f d e60f
+015f 015f s ANI 0x0F
+0161 0161 d cd6701
+0161 0161 s CALL TxHexDig
+0164 0164 d f1
+0164 0164 s POP PSW
+0165 0165 d e60f
+0165 0165 s ANI 0x0F
+0167 0167 d c630
+0167 0167 s TxHexDig: ADI '0'
+0169 0169 d fe3a
+0169 0169 s CPI '9' + 1
+016b 016b d fa7001
+016b 016b s JM TxHexDigOut
+016e 016e d c607
+016e 016e s ADI 0x07
+0170 0170 d cd7401
+0170 0170 s TxHexDigOut: CALL SendChar
+0173 0173 d c9
+0173 0173 s RET
+0174 0174 s
+0174 0174 d f5
+0174 0174 s SendChar: PUSH PSW
+0175 0175 d db10
+0175 0175 s CheckIfReady: IN ACIA0_STATUS
+0177 0177 d e602
+0177 0177 s ANI MASK_READY
+0179 0179 d ca7501
+0179 0179 s JZ CheckIfReady
+017c 017c d f1
+017c 017c s POP PSW
+017d 017d d d311
+017d 017d s OUT ACIA0_DATA
+017f 017f d c9
+017f 017f s RET
+0180 0180 s
+0180 0180 d 21ffff
+0180 0180 s GetLowestRam: LXI H, 0xFFFF ;assume RAM is located near top of address space
+0183 0183 d 7e
+0183 0183 s NextAddress: MOV A, M
+0184 0184 d be
+0184 0184 s CMP M
+0185 0185 d c29701
+0185 0185 s JNZ LowestFound
+0188 0188 d 2f
+0188 0188 s CMA ;flip all bits
+0189 0189 d 77
+0189 0189 s MOV M, A
+018a 018a d be
+018a 018a s CMP M
+018b 018b d c29701
+018b 018b s JNZ LowestFound
+018e 018e d 2f
+018e 018e s CMA
+018f 018f d 77
+018f 018f s MOV M, A
+0190 0190 d 7c
+0190 0190 s MOV A, H
+0191 0191 d b5
+0191 0191 s ORA L
+0192 0192 d c8
+0192 0192 s RZ ;Bail if HL = 0
+0193 0193 d 2b
+0193 0193 s DCX H
+0194 0194 d c38301
+0194 0194 s JMP NextAddress
+0197 0197 d 23
+0197 0197 s LowestFound: INX H
+0198 0198 d c9
+0198 0198 s RET
+0199 0199 s
+0199 0199 s
+0199 0199 d 0d4146203d2000
+0199 0199 s TextAF: DB CR, "AF = ", 0x00
+01a0 01a0 d 0d4243203d2000
+01a0 01a0 s TextBC: DB CR, "BC = ", 0x00
+01a7 01a7 d 0d4445203d2000
+01a7 01a7 s TextDE: DB CR, "DE = ", 0x00
+01ae 01ae d 0d484c203d2000
+01ae 01ae s TextHL: DB CR, "HL = ", 0x00
+01b5 01b5 d 0d5043203d2000
+01b5 01b5 s TextPC: DB CR, "PC = ", 0x00
+01bc 01bc d 0d5350203d2000
+01bc 01bc s TextSP: DB CR, "SP = ", 0x00
+01c3 01c3 d 0d0d2a2a20537973393038302069732072656164792e2052414d207374617274732061742000
+01c3 01c3 s TextGreet1: DB CR, CR, "** Sys9080 is ready. RAM starts at ", 0x00
+01e9 01e9 d 20496e70757420706f7274203d2000
+01e9 01e9 s TextPort DB " Input port = ", 0x00
+01f8 01f8 d 202a2a0d20202850726573732042544e3020746f2073686f772070726f636573736f722073746174652c206f722042544e3120666f72204143494173290d00
+01f8 01f8 s TextGreet2: DB " **", CR, " (Press BTN0 to show processor state, or BTN1 for ACIAs)", CR, 0x00
+0237 0237 d 0d41434941302052782073746174757320616e642064617461203d2000
+0237 0237 s TextACIA0: DB CR, "ACIA0 Rx status and data = ", 0x00
+0254 0254 d 0d41434941312052782073746174757320616e642064617461203d2000
+0254 0254 s TextACIA1: DB CR, "ACIA1 Rx status and data = ", 0x00
+0271 0271 d 00
+0271 0271 s End: DB 0x00 ;Cheap trick to see last used address
+000a v lf
+000d v cr
+0271 a end
+00ed a boot
+0000 v port_0
+0001 v port_1
+01a0 a textbc
+0400 v altmon
+0199 a textaf
+01a7 a textde
+01b5 a textpc
+01ae a texthl
+01bc a textsp
+ff00 v temp_pc
+0174 a sendchar
+0167 a txhexdig
+0130 a nextline
+00b0 a notfound
+0237 a textacia0
+0254 a textacia1
+01e9 a textport
+0011 v acia0_data
+0013 v acia1_data
+0144 a bytesathl
+0039 a dumpstate
+01c3 a textgreet1
+01f8 a textgreet2
+0001 v mask_valid
+0002 v mask_ready
+0040 v mask_error
+015a a txvalueofa
+0097 a searchforpc
+0080 v mask_intreq
+0183 a nextaddress
+0155 a txvalueofhl
+00ea a processbyte
+00b4 a restoreregs
+0197 a lowestfound
+0170 a txhexdigout
+0010 v acia0_status
+0012 v acia1_status
+0002 v mask_button1
+0175 a checkifready
+0123 a sendnextchar
+0146 a nextbyteathl
+0180 a getlowestram
+013a a txstringathl
+0120 a printasciiset
+00ba a onbytereceived
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.bds
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cim
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cim
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cim (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cim (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cim
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cmd
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cmd (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.cmd
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.hex
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.hex (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.hex (revision 3)
@@ -0,0 +1,44 @@
+:04000000F3C3ED0059
+:04000800F3C3390005
+:04001000F3C33900FD
+:04001800F3C33900F5
+:04002000F3C3BA006C
+:04002800F3C3BA0064
+:02003000FBC90A
+:10003800F3E32200FFE3E5D5C5F5E5D5C5F521993C
+:1000480001CD3A01E3CD5501E121A001CD3A01E30B
+:10005800CD5501CD4401E121A701CD3A01E3CD55AC
+:1000680001CD4401E121AE01CD3A01E3CD5501CDE9
+:100078004401E121B501CD3A012A00FFCD5501CD5A
+:10008800440121BC01CD3A0111FFFF2A00FFEB7AA0
+:10009800BEC2B0002B7BBEC29700CD5501CD440136
+:1000A8003E0DCD7401C3B4002BC39700F1C1D1E15B
+:1000B800FBC9F5DB01E602CAEA00E5D5C5DB126734
+:1000C800DB136FE5DB1067DB116FE5213702CD3AF3
+:1000D80001E1CD5501215402CD3A01E1CD5501C1CF
+:1000E800D1E1F1FBC92100002BF921C301CD3A016F
+:1000F800CD80017DD3007CD301CD550121E901CD0F
+:100108003A01DB006FDB0167CD550121F801CD3ADB
+:1001180001CD2001FBC3000401200D79CD7401FE3F
+:100128007ECA30010CC3230178CD7401EE06CD746C
+:1001380001C97EA7C8CD740123F23A010E103E20F2
+:10014800CD74017ECD5A010DC823C346017CCD5A1A
+:10015800017DF50F0F0F0FE60FCD6701F1E60FC612
+:1001680030FE3AFA7001C607CD7401C9F5DB10E616
+:1001780002CA7501F1D311C921FFFF7EBEC29701E2
+:100188002F77BEC297012F777CB5C82BC383012375
+:10019800C90D4146203D20000D4243203D20000D61
+:1001A8004445203D20000D484C203D20000D504383
+:1001B800203D20000D5350203D20000D0D2A2A20FF
+:1001C80053797339303830206973207265616479E6
+:1001D8002E2052414D207374617274732061742013
+:1001E8000020496E70757420706F7274203D200075
+:1001F800202A2A0D20202850726573732042544EFD
+:100208003020746F2073686F772070726F63657326
+:10021800736F722073746174652C206F722042545E
+:100228004E3120666F72204143494173290D000DFC
+:1002380041434941302052782073746174757320AA
+:10024800616E642064617461203D20000D41434962
+:1002580041312052782073746174757320616E6423
+:0A0268002064617461203D20000055
+:0000000000
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.hex
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lcas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lcas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lcas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lcas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lcas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lst
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lst (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lst (revision 3)
@@ -0,0 +1,387 @@
+ 1: ;--------------------------------------------------------------------------
+ 2: ; Simple test program for Sys9080 project https://github.com/zpekic/sys9080
+ 3: ; (c) zpekic@hotmail.com - 2017, 2018
+ 4: ;--------------------------------------------------------------------------
+ 5: - 0010 ACIA0_STATUS EQU 0x10; status read-only
+ 6: - 0011 ACIA0_DATA EQU 0x11; data send/receive
+ 7: - 0012 ACIA1_STATUS EQU 0x12; status read-only
+ 8: - 0013 ACIA1_DATA EQU 0x13; data send/receive
+ 9: - 0000 PORT_0 EQU 0x00;
+ 10: - 0001 PORT_1 EQU 0x01;
+ 11: - 0001 MASK_VALID EQU 0x01; fields in UART status register
+ 12: - 0002 MASK_READY EQU 0x02;
+ 13: - 0040 MASK_ERROR EQU 0x40;
+ 14: - 0080 MASK_INTREQ EQU 0x80;
+ 15: - 000D CR EQU 0x0D; ASCII newline
+ 16: - 000A LF EQU 0x0A; ASCII line feed
+ 17: - 0002 MASK_BUTTON1 EQU 0x02;
+ 18: - FF00 Temp_PC EQU 0xFF00; can't use DW because the hex file maps to ROM only
+ 19: - 0400 AltMon EQU 0x0400; Altmon is org'd to this location
+ 20:
+ 21:
+ 22: - 0000 ORG 0x0000 ;-----RST0 == RESET
+ 23: 0+4 0000 F3 DI
+ 24: 4+10 0001 C3ED00 JMP Boot
+ 25:
+ 26: - 0008 ORG 0x0008 ;-----RST1 (not used)
+ 27: 14+4 0008 F3 DI
+ 28: 18+10 0009 C33900 JMP DumpState
+ 29:
+ 30: - 0010 ORG 0x0010 ;-----RST2 (not used)
+ 31: 28+4 0010 F3 DI
+ 32: 32+10 0011 C33900 JMP DumpState
+ 33:
+ 34: - 0018 ORG 0x0018 ;-----RST3 (not used)
+ 35: 42+4 0018 F3 DI
+ 36: 46+10 0019 C33900 JMP DumpState
+ 37:
+ 38: - 0020 ORG 0x0020 ;-----RST4 (ACIA1)
+ 39: 56+4 0020 F3 DI
+ 40: 60+10 0021 C3BA00 JMP OnByteReceived
+ 41:
+ 42: - 0028 ORG 0x0028 ;-----RST5 (ACIA0)
+ 43: 70+4 0028 F3 DI
+ 44: 74+10 0029 C3BA00 JMP OnByteReceived
+ 45:
+ 46: - 0030 ORG 0x0030 ;-----RST6 (BTN1)
+ 47: 84+4 0030 FB EI ;no interrupt servicing (used to control ACIA status)
+ 48: 88+10 0031 C9 RET
+ 49:
+ 50: - 0038 ORG 0x0038 ;-----RST7 (BTN0)
+ 51: 98+4 0038 F3 DI
+ 52: 102+18 0039 E3 DumpState: XTHL ;PC from stack is now in HL
+ 53: 120+16 003A 2200FF SHLD Temp_PC ;store away (making this code non re-entrant)
+ 54: 136+18 003D E3 XTHL ;restore PC to stack
+ 55: 154+11 003E E5 PUSH H
+ 56: 165+11 003F D5 PUSH D
+ 57: 176+11 0040 C5 PUSH B
+ 58: 187+11 0041 F5 PUSH PSW
+ 59:
+ 60: 198+11 0042 E5 PUSH H
+ 61: 209+11 0043 D5 PUSH D
+ 62: 220+11 0044 C5 PUSH B
+ 63: 231+11 0045 F5 PUSH PSW
+ 64:
+ 65: 242+10 0046 219901 LXI H, TextAF
+ 66: 252+17 0049 CD3A01 CALL TxStringAtHL
+ 67: 269+18 004C E3 XTHL
+ 68: 287+17 004D CD5501 CALL TxValueOfHL
+ 69: 304+10 0050 E1 POP H
+ 70:
+ 71: 314+10 0051 21A001 LXI H, TextBC
+ 72: 324+17 0054 CD3A01 CALL TxStringAtHL
+ 73: 341+18 0057 E3 XTHL
+ 74: 359+17 0058 CD5501 CALL TxValueOfHL
+ 75: 376+17 005B CD4401 CALL BytesAtHL
+ 76: 393+10 005E E1 POP H
+ 77:
+ 78: 403+10 005F 21A701 LXI H, TextDE
+ 79: 413+17 0062 CD3A01 CALL TxStringAtHL
+ 80: 430+18 0065 E3 XTHL
+ 81: 448+17 0066 CD5501 CALL TxValueOfHL
+ 82: 465+17 0069 CD4401 CALL BytesAtHL
+ 83: 482+10 006C E1 POP H
+ 84:
+ 85: 492+10 006D 21AE01 LXI H, TextHL
+ 86: 502+17 0070 CD3A01 CALL TxStringAtHL
+ 87: 519+18 0073 E3 XTHL
+ 88: 537+17 0074 CD5501 CALL TxValueOfHL
+ 89: 554+17 0077 CD4401 CALL BytesAtHL
+ 90: 571+10 007A E1 POP H
+ 91:
+ 92: 581+10 007B 21B501 LXI H, TextPC
+ 93: 591+17 007E CD3A01 CALL TxStringAtHL
+ 94: 608+16 0081 2A00FF LHLD Temp_PC
+ 95: 624+17 0084 CD5501 CALL TxValueOfHL
+ 96: 641+17 0087 CD4401 CALL BytesAtHL
+ 97:
+ 98: 658+10 008A 21BC01 LXI H, TextSP
+ 99: 668+17 008D CD3A01 CALL TxStringAtHL
+ 100: 685+10 0090 11FFFF LXI D, 0xFFFF ;start searching for stack position from top of memory down
+ 101: 695+16 0093 2A00FF LHLD Temp_PC
+ 102: 711+5 0096 EB XCHG ;HL = 0xFFFF, DE = PC to search for
+ 103: 716+5 0097 7A SearchForPC: MOV A, D
+ 104: 721+7 0098 BE CMP M
+ 105: 728+10 0099 C2B000 JNZ NotFound
+ 106: 738+5 009C 2B DCX H
+ 107: 743+5 009D 7B MOV A, E
+ 108: 748+7 009E BE CMP M
+ 109: 755+10 009F C29700 JNZ SearchForPC
+ 110: 765+17 00A2 CD5501 CALL TxValueOfHL
+ 111: 782+17 00A5 CD4401 CALL BytesAtHL
+ 112: 799+7 00A8 3E0D MVI A, CR
+ 113: 806+17 00AA CD7401 CALL SendChar
+ 114: 823+10 00AD C3B400 JMP RestoreRegs
+ 115: 833+5 00B0 2B NotFound: DCX H
+ 116: 838+10 00B1 C39700 JMP SearchForPC
+ 117:
+ 118: 848+10 00B4 F1 RestoreRegs: POP PSW
+ 119: 858+10 00B5 C1 POP B
+ 120: 868+10 00B6 D1 POP D
+ 121: 878+10 00B7 E1 POP H
+ 122: 888+4 00B8 FB EI
+ 123: 892+10 00B9 C9 RET
+ 124:
+ 125: ;-------------------------------------------
+ 126: 902+11 00BA F5 OnByteReceived: PUSH PSW
+ 127: 913+10 00BB DB01 IN PORT_1 ;hooked up to 4 push buttons
+ 128: 923+7 00BD E602 ANI MASK_BUTTON1
+ 129: 930+10 00BF CAEA00 JZ ProcessByte
+ 130: 940+11 00C2 E5 PUSH H
+ 131: 951+11 00C3 D5 PUSH D
+ 132: 962+11 00C4 C5 PUSH B
+ 133:
+ 134: 973+10 00C5 DB12 IN ACIA1_STATUS
+ 135: 983+5 00C7 67 MOV H, A
+ 136: 988+10 00C8 DB13 IN ACIA1_DATA
+ 137: 998+5 00CA 6F MOV L, A
+ 138: 1003+11 00CB E5 PUSH H
+ 139:
+ 140: 1014+10 00CC DB10 IN ACIA0_STATUS
+ 141: 1024+5 00CE 67 MOV H, A
+ 142: 1029+10 00CF DB11 IN ACIA0_DATA
+ 143: 1039+5 00D1 6F MOV L, A
+ 144: 1044+11 00D2 E5 PUSH H
+ 145:
+ 146: 1055+10 00D3 213702 LXI H, TextACIA0
+ 147: 1065+17 00D6 CD3A01 CALL TxStringAtHL
+ 148: 1082+10 00D9 E1 POP H
+ 149: 1092+17 00DA CD5501 CALL TxValueOfHL
+ 150:
+ 151: 1109+10 00DD 215402 LXI H, TextACIA1
+ 152: 1119+17 00E0 CD3A01 CALL TxStringAtHL
+ 153: 1136+10 00E3 E1 POP H
+ 154: 1146+17 00E4 CD5501 CALL TxValueOfHL
+ 155:
+ 156: 1163+10 00E7 C1 POP B
+ 157: 1173+10 00E8 D1 POP D
+ 158: 1183+10 00E9 E1 POP H
+ 159: 1193+10 00EA F1 ProcessByte: POP PSW
+ 160: 1203+4 00EB FB EI
+ 161: 1207+10 00EC C9 RET
+ 162: ;-------------------------------------------
+ 163: 1217+10 00ED 210000 Boot: LXI H, 0000H
+ 164: 1227+5 00F0 2B DCX H
+ 165: 1232+5 00F1 F9 SPHL
+ 166: 1237+10 00F2 21C301 LXI H, TextGreet1
+ 167: 1247+17 00F5 CD3A01 CALL TxStringAtHL
+ 168: 1264+17 00F8 CD8001 CALL GetLowestRam
+ 169: 1281+5 00FB 7D MOV A, L
+ 170: 1286+10 00FC D300 OUT PORT_0
+ 171: 1296+5 00FE 7C MOV A, H
+ 172: 1301+10 00FF D301 OUT PORT_1 ;display on LEDs
+ 173: 1311+17 0101 CD5501 CALL TxValueOfHL ;display on console
+ 174: 1328+10 0104 21E901 LXI H, TextPort
+ 175: 1338+17 0107 CD3A01 CALL TxStringAtHL
+ 176: 1355+10 010A DB00 IN PORT_0
+ 177: 1365+5 010C 6F MOV L, A
+ 178: 1370+10 010D DB01 IN PORT_1
+ 179: 1380+5 010F 67 MOV H, A
+ 180: 1385+17 0110 CD5501 CALL TxValueOfHL
+ 181: 1402+10 0113 21F801 LXI H, TextGreet2
+ 182: 1412+17 0116 CD3A01 CALL TxStringAtHL
+ 183: 1429+17 0119 CD2001 CALL PrintAsciiSet
+ 184: 1446+4 011C FB EI
+ 185: ; HLT ;interrupt is needed to go further
+ 186: ;-------------------------------------------------------------------------
+ 187: 1450+10 011D C30004 JMP AltMon ;enter monitor program
+ 188: ;-------------------------------------------------------------------------
+ 189: 1460+10 0120 01200D PrintAsciiSet: LXI B, 0D20H ;set C to ASCII space
+ 190: 1470+5 0123 79 SendNextChar: MOV A, C
+ 191: 1475+17 0124 CD7401 CALL SendChar ;send char
+ 192: 1492+7 0127 FE7E CPI "~" ;end of printable chars reached?
+ 193: 1499+10 0129 CA3001 JZ NextLine
+ 194: 1509+5 012C 0C INR C
+ 195: 1514+10 012D C32301 JMP SendNextChar
+ 196: 1524+5 0130 78 NextLine: MOV A, B
+ 197: 1529+17 0131 CD7401 CALL SendChar ;send char
+ 198: 1546+7 0134 EE06 XRI 00000110B ;cheap trick to convert newline to linefeed
+ 199: 1553+17 0136 CD7401 CALL SendChar ;send char
+ 200: 1570+10 0139 C9 RET
+ 201:
+ 202: 1580+7 013A 7E TxStringAtHL: MOV A, M
+ 203: 1587+4 013B A7 ANA A
+ 204: 1591+5+6 013C C8 RZ
+ 205: 1596+17 013D CD7401 CALL SendChar
+ 206: 1613+5 0140 23 INX H
+ 207: 1618+10 0141 F23A01 JP TxStringAtHL
+ 208:
+ 209: 1628+7 0144 0E10 BytesAtHL: MVI C, 0x10 ;dump 16 bytes at (HL)
+ 210: 1635+7 0146 3E20 NextByteAtHL: MVI A, " "
+ 211: 1642+17 0148 CD7401 CALL SendChar
+ 212: 1659+7 014B 7E MOV A, M
+ 213: 1666+17 014C CD5A01 CALL TxValueOfA
+ 214: 1683+5 014F 0D DCR C
+ 215: 1688+5+6 0150 C8 RZ ;return if reached 0
+ 216: 1693+5 0151 23 INX H
+ 217: 1698+10 0152 C34601 JMP NextByteAtHL
+ 218:
+ 219: 1708+5 0155 7C TxValueOfHL: MOV A, H
+ 220: 1713+17 0156 CD5A01 CALL TxValueOfA
+ 221: 1730+5 0159 7D MOV A, L
+ 222: 1735+11 015A F5 TxValueOfA: PUSH PSW
+ 223: 1746+4 015B 0F RRC
+ 224: 1750+4 015C 0F RRC
+ 225: 1754+4 015D 0F RRC
+ 226: 1758+4 015E 0F RRC
+ 227: 1762+7 015F E60F ANI 0x0F
+ 228: 1769+17 0161 CD6701 CALL TxHexDig
+ 229: 1786+10 0164 F1 POP PSW
+ 230: 1796+7 0165 E60F ANI 0x0F
+ 231: 1803+7 0167 C630 TxHexDig: ADI '0'
+ 232: 1810+7 0169 FE3A CPI '9' + 1
+ 233: 1817+10 016B FA7001 JM TxHexDigOut
+ 234: 1827+7 016E C607 ADI 0x07
+ 235: 1834+17 0170 CD7401 TxHexDigOut: CALL SendChar
+ 236: 1851+10 0173 C9 RET
+ 237:
+ 238: 1861+11 0174 F5 SendChar: PUSH PSW
+ 239: 1872+10 0175 DB10 CheckIfReady: IN ACIA0_STATUS
+ 240: 1882+7 0177 E602 ANI MASK_READY
+ 241: 1889+10 0179 CA7501 JZ CheckIfReady
+ 242: 1899+10 017C F1 POP PSW
+ 243: 1909+10 017D D311 OUT ACIA0_DATA
+ 244: 1919+10 017F C9 RET
+ 245:
+ 246: 1929+10 0180 21FFFF GetLowestRam: LXI H, 0xFFFF ;assume RAM is located near top of address space
+ 247: 1939+7 0183 7E NextAddress: MOV A, M
+ 248: 1946+7 0184 BE CMP M
+ 249: 1953+10 0185 C29701 JNZ LowestFound
+ 250: 1963+4 0188 2F CMA ;flip all bits
+ 251: 1967+7 0189 77 MOV M, A
+ 252: 1974+7 018A BE CMP M
+ 253: 1981+10 018B C29701 JNZ LowestFound
+ 254: 1991+4 018E 2F CMA
+ 255: 1995+7 018F 77 MOV M, A
+ 256: 2002+5 0190 7C MOV A, H
+ 257: 2007+4 0191 B5 ORA L
+ 258: 2011+5+6 0192 C8 RZ ;Bail if HL = 0
+ 259: 2016+5 0193 2B DCX H
+ 260: 2021+10 0194 C38301 JMP NextAddress
+ 261: 2031+5 0197 23 LowestFound: INX H
+ 262: 2036+10 0198 C9 RET
+ 263:
+ 264:
+ 265: - 0199 0D414620 TextAF: DB CR, "AF = ", 0x00
+ 3D2000
+ 266: - 01A0 0D424320 TextBC: DB CR, "BC = ", 0x00
+ 3D2000
+ 267: - 01A7 0D444520 TextDE: DB CR, "DE = ", 0x00
+ 3D2000
+ 268: - 01AE 0D484C20 TextHL: DB CR, "HL = ", 0x00
+ 3D2000
+ 269: - 01B5 0D504320 TextPC: DB CR, "PC = ", 0x00
+ 3D2000
+ 270: - 01BC 0D535020 TextSP: DB CR, "SP = ", 0x00
+ 3D2000
+ 271: - 01C3 0D0D2A2A TextGreet1: DB CR, CR, "** Sys9080 is ready. RAM starts at ", 0x00
+ 20537973
+ 39303830
+ 20697320
+ 72656164
+ 792E2052
+ 414D2073
+ 74617274
+ 73206174
+ 2000
+ 272: - 01E9 20496E70 TextPort DB " Input port = ", 0x00
+ 75742070
+ 6F727420
+ 3D2000
+ 273: - 01F8 202A2A0D TextGreet2: DB " **", CR, " (Press BTN0 to show processor state, or BTN1 for ACIAs)", CR, 0x00
+ 20202850
+ 72657373
+ 2042544E
+ 3020746F
+ 2073686F
+ 77207072
+ 6F636573
+ 736F7220
+ 73746174
+ 652C206F
+ 72204254
+ 4E312066
+ 6F722041
+ 43494173
+ 290D00
+ 274: - 0237 0D414349 TextACIA0: DB CR, "ACIA0 Rx status and data = ", 0x00
+ 41302052
+ 78207374
+ 61747573
+ 20616E64
+ 20646174
+ 61203D20
+ 00
+ 275: - 0254 0D414349 TextACIA1: DB CR, "ACIA1 Rx status and data = ", 0x00
+ 41312052
+ 78207374
+ 61747573
+ 20616E64
+ 20646174
+ 61203D20
+ 00
+ 276: - 0271 00 End: DB 0x00 ;Cheap trick to see last used address
+
+
+
+Statistics:
+
+ 4 passes
+ 0 jr promotions
+ 49 symbols
+ 596 bytes
+
+
+
+Symbol Table:
+
+acia0_data = 11
+acia0_status = 10
+acia1_data = 13
+acia1_status = 12
+altmon = 400
+boot ed
+bytesathl 144
+checkifready 175
+cr = d
+dumpstate 39
+end 271
+getlowestram 180
+lf = a
+lowestfound 197
+mask_button1 = 2
+mask_error = 40
+mask_intreq = 80
+mask_ready = 2
+mask_valid = 1
+nextaddress 183
+nextbyteathl 146
+nextline 130
+notfound b0
+onbytereceived ba
+port_0 = 0
+port_1 = 1
+printasciiset 120
+processbyte ea
+restoreregs b4
+searchforpc 97
+sendchar 174
+sendnextchar 123
+temp_pc =ff00
+textacia0 237
+textacia1 254
+textaf 199
+textbc 1a0
+textde 1a7
+textgreet1 1c3
+textgreet2 1f8
+texthl 1ae
+textpc 1b5
+textport 1e9
+textsp 1bc
+txhexdig 167
+txhexdigout 170
+txstringathl 13a
+txvalueofa 15a
+txvalueofhl 155
+
\ No newline at end of file
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.lst
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.tap
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.tap
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.tap (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.tap (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/boot.tap
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.ams
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.ams
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.ams (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.ams (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.ams
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.bds
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.bds (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.bds (revision 3)
@@ -0,0 +1,1636 @@
+binary-debuggable-source
+0000 0000 f cpudiag.asm
+0000 0000 s ;***********************************************************************
+0000 0000 s ; MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980
+0000 0000 s ;***********************************************************************
+0000 0000 s ;
+0000 0000 s ;DONATED TO THE "SIG/M" CP/M USER'S GROUP BY:
+0000 0000 s ;KELLY SMITH, MICROCOSM ASSOCIATES
+0000 0000 s ;3055 WACO AVENUE
+0000 0000 s ;SIMI VALLEY, CALIFORNIA, 93065
+0000 0000 s ;(805) 527-9321 (MODEM, CP/M-NET (TM))
+0000 0000 s ;(805) 527-0518 (VERBAL)
+0000 0000 s ;
+0000 0000 s BDOS EQU 00005H ;BDOS ENTRY TO CP/M
+0000 0000 s WBOOT EQU 00000H ;RE-ENTRY TO CP/M WARM BOOT
+0000 0000 s ;
+0000 0000 s ;
+0000 0000 s ORG WBOOT; -- CPU starts here after reset
+0000 0000 d f3
+0000 0000 s DI
+0001 0001 d c32800
+0001 0001 s JMP INIT
+0004 0004 s ;
+0004 0004 s ; -- Fake "BDOS", only implement functions 2 and 9 (https://www.seasip.info/Cpm/bdos.html)
+0004 0004 s ;
+0005 0005 s ORG BDOS;
+0005 0005 d f5
+0005 0005 s PUSH PSW
+0006 0006 d 79
+0006 0006 s MOV A, C
+0007 0007 s
+0007 0007 d fe02
+0007 0007 s CPI 2
+0009 0009 d ca1400
+0009 0009 s JZ C_WRITE
+000c 000c d fe09
+000c 000c s CPI 9
+000e 000e d ca1a00
+000e 000e s JZ C_WRITESTR
+0011 0011 d c32600
+0011 0011 s JMP DONE
+0014 0014 s
+0014 0014 d 7b
+0014 0014 s C_WRITE: MOV A, E
+0015 0015 d d300
+0015 0015 s OUT 00H
+0017 0017 d c32600
+0017 0017 s JMP DONE
+001a 001a s
+001a 001a d 1a
+001a 001a s C_WRITESTR: LDAX D
+001b 001b d fe24
+001b 001b s CPI '$'
+001d 001d d ca2600
+001d 001d s JZ DONE
+0020 0020 d d300
+0020 0020 s OUT 00H
+0022 0022 d 13
+0022 0022 s INX D
+0023 0023 d c31a00
+0023 0023 s JMP C_WRITESTR
+0026 0026 s
+0026 0026 d f1
+0026 0026 s DONE: POP PSW
+0027 0027 d c9
+0027 0027 s RET
+0028 0028 s
+0028 0028 d 210000
+0028 0028 s INIT: LXI H, 0000H
+002b 002b d 2b
+002b 002b s DCX H
+002c 002c d f9
+002c 002c s SPHL
+002d 002d d fb
+002d 002d s EI
+002e 002e d c3af01
+002e 002e s JMP CPU
+0031 0031 s ;
+0031 0031 s ;
+0031 0031 s
+0100 0100 s ORG 00100H
+0100 0100 s ;
+0100 0100 s ;
+0100 0100 s ;
+0100 0100 d c3af01
+0100 0100 s JMP CPU ;JUMP TO 8080 CPU DIAGNOSTIC
+0103 0103 s ;
+0103 0103 s ;
+0103 0103 s ;
+0103 0103 d 4d4943524f434f534d204153534f43494154455320383038302f383038352043505520444941474e4f53544943
+0103 0103 s DB 'MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC'
+0130 0130 d 2056455253494f4e20312e3020202843292031393830
+0130 0130 s DB ' VERSION 1.0 (C) 1980'
+0146 0146 s ;
+0146 0146 s ;
+0146 0146 s ;
+0146 0146 s
+0146 0146 s ;
+0146 0146 s ;
+0146 0146 s ;
+0146 0146 s ;MESSAGE OUTPUT ROUTINE
+0146 0146 s ;
+0146 0146 d d5
+0146 0146 s MSG: PUSH D ;EXILE D REG.
+0147 0147 d eb
+0147 0147 s XCHG ;SWAP H&L REGS. TO D&E REGS.
+0148 0148 d 0e09
+0148 0148 s MVI C,9 ;LET BDOS KNOW WE WANT TO SEND A MESSAGE
+014a 014a d cd0500
+014a 014a s CALL BDOS
+014d 014d d d1
+014d 014d s POP D ;BACK FROM EXILE
+014e 014e d c9
+014e 014e s RET
+014f 014f s ;
+014f 014f s ;
+014f 014f s ;
+014f 014f s ;CHARACTER OUTPUT ROUTINE
+014f 014f s ;
+014f 014f d 0e02
+014f 014f s PCHAR: MVI C,2
+0151 0151 d cd0500
+0151 0151 s CALL BDOS
+0154 0154 d c9
+0154 0154 s RET
+0155 0155 s ;
+0155 0155 s ;
+0155 0155 s ;
+0155 0155 d f5
+0155 0155 s BYTEO: PUSH PSW
+0156 0156 d cd6501
+0156 0156 s CALL BYTO1
+0159 0159 d 5f
+0159 0159 s MOV E,A
+015a 015a d cd4f01
+015a 015a s CALL PCHAR
+015d 015d d f1
+015d 015d s POP PSW
+015e 015e d cd6901
+015e 015e s CALL BYTO2
+0161 0161 d 5f
+0161 0161 s MOV E,A
+0162 0162 d c34f01
+0162 0162 s JMP PCHAR
+0165 0165 d 0f
+0165 0165 s BYTO1: RRC
+0166 0166 d 0f
+0166 0166 s RRC
+0167 0167 d 0f
+0167 0167 s RRC
+0168 0168 d 0f
+0168 0168 s RRC
+0169 0169 d e60f
+0169 0169 s BYTO2: ANI 0FH
+016b 016b d fe0a
+016b 016b s CPI 0AH
+016d 016d d fa7201
+016d 016d s JM BYTO3
+0170 0170 d c607
+0170 0170 s ADI 7
+0172 0172 d c630
+0172 0172 s BYTO3: ADI 30H
+0174 0174 d c9
+0174 0174 s RET
+0175 0175 s ;
+0175 0175 s ;
+0175 0175 s ;
+0175 0175 s ;************************************************************
+0175 0175 s ; MESSAGE TABLE FOR OPERATIONAL CPU TEST
+0175 0175 s ;************************************************************
+0175 0175 s ;
+0175 0175 d 0c0d0a20435055204953204f5045524154494f4e414c24
+0175 0175 s OKCPU: DB 0CH,0DH,0AH,' CPU IS OPERATIONAL$'
+018c 018c s ;
+018c 018c d 0c0d0a2043505520484153204641494c454421202020204552524f5220455849543d24
+018c 018c s NGCPU: DB 0CH,0DH,0AH,' CPU HAS FAILED! ERROR EXIT=$'
+01af 01af s ;
+01af 01af s ;
+01af 01af s ;
+01af 01af s ;************************************************************
+01af 01af s ; 8080/8085 CPU TEST/DIAGNOSTIC
+01af 01af s ;************************************************************
+01af 01af s ;
+01af 01af s ;NOTE: (1) PROGRAM ASSUMES "CALL",AND "LXI SP" INSTRUCTIONS WORK!
+01af 01af s ;
+01af 01af s ; (2) INSTRUCTIONS NOT TESTED ARE "HLT","DI","EI","RIM","SIM",
+01af 01af s ; AND "RST 0" THRU "RST 7"
+01af 01af s ;
+01af 01af s ;
+01af 01af s ;
+01af 01af s ;TEST JUMP INSTRUCTIONS AND FLAGS
+01af 01af s ;
+01af 01af d 3180ff
+01af 01af s CPU: LXI SP,STACK ;SET THE STACK POINTER
+01b2 01b2 d e600
+01b2 01b2 s ANI 0 ;INITIALIZE A REG. AND CLEAR ALL FLAGS
+01b4 01b4 d caba01
+01b4 01b4 s JZ J010 ;TEST "JZ"
+01b7 01b7 d cd8d06
+01b7 01b7 s CALL CPUER
+01ba 01ba d d2c001
+01ba 01ba s J010: JNC J020 ;TEST "JNC"
+01bd 01bd d cd8d06
+01bd 01bd s CALL CPUER
+01c0 01c0 d eac601
+01c0 01c0 s J020: JPE J030 ;TEST "JPE"
+01c3 01c3 d cd8d06
+01c3 01c3 s CALL CPUER
+01c6 01c6 d f2cc01
+01c6 01c6 s J030: JP J040 ;TEST "JP"
+01c9 01c9 d cd8d06
+01c9 01c9 s CALL CPUER
+01cc 01cc d c2db01
+01cc 01cc s J040: JNZ J050 ;TEST "JNZ"
+01cf 01cf d dadb01
+01cf 01cf s JC J050 ;TEST "JC"
+01d2 01d2 d e2db01
+01d2 01d2 s JPO J050 ;TEST "JPO"
+01d5 01d5 d fadb01
+01d5 01d5 s JM J050 ;TEST "JM"
+01d8 01d8 d c3de01
+01d8 01d8 s JMP J060 ;TEST "JMP" (IT'S A LITTLE LATE,BUT WHAT THE HELL!
+01db 01db d cd8d06
+01db 01db s J050: CALL CPUER
+01de 01de d c606
+01de 01de s J060: ADI 6 ;A=6,C=0,P=1,S=0,Z=0
+01e0 01e0 d c2e601
+01e0 01e0 s JNZ J070 ;TEST "JNZ"
+01e3 01e3 d cd8d06
+01e3 01e3 s CALL CPUER
+01e6 01e6 d daef01
+01e6 01e6 s J070: JC J080 ;TEST "JC"
+01e9 01e9 d e2ef01
+01e9 01e9 s JPO J080 ;TEST "JPO"
+01ec 01ec d f2f201
+01ec 01ec s JP J090 ;TEST "JP"
+01ef 01ef d cd8d06
+01ef 01ef s J080: CALL CPUER
+01f2 01f2 d c670
+01f2 01f2 s J090: ADI 070H ;A=76H,C=0,P=0,S=0,Z=0
+01f4 01f4 d e2fa01
+01f4 01f4 s JPO J100 ;TEST "JPO"
+01f7 01f7 d cd8d06
+01f7 01f7 s CALL CPUER
+01fa 01fa d fa0302
+01fa 01fa s J100: JM J110 ;TEST "JM"
+01fd 01fd d ca0302
+01fd 01fd s JZ J110 ;TEST "JZ"
+0200 0200 d d20602
+0200 0200 s JNC J120 ;TEST "JNC"
+0203 0203 d cd8d06
+0203 0203 s J110: CALL CPUER
+0206 0206 d c681
+0206 0206 s J120: ADI 081H ;A=F7H,C=0,P=0,S=1,Z=0
+0208 0208 d fa0e02
+0208 0208 s JM J130 ;TEST "JM"
+020b 020b d cd8d06
+020b 020b s CALL CPUER
+020e 020e d ca1702
+020e 020e s J130: JZ J140 ;TEST "JZ"
+0211 0211 d da1702
+0211 0211 s JC J140 ;TEST "JC"
+0214 0214 d e21a02
+0214 0214 s JPO J150 ;TEST "JPO"
+0217 0217 d cd8d06
+0217 0217 s J140: CALL CPUER
+021a 021a d c6fe
+021a 021a s J150: ADI 0FEH ;A=F5H,C=1,P=1,S=1,Z=0
+021c 021c d da2202
+021c 021c s JC J160 ;TEST "JC"
+021f 021f d cd8d06
+021f 021f s CALL CPUER
+0222 0222 d ca2b02
+0222 0222 s J160: JZ J170 ;TEST "JZ"
+0225 0225 d e22b02
+0225 0225 s JPO J170 ;TEST "JPO"
+0228 0228 d fa2e02
+0228 0228 s JM AIMM ;TEST "JM"
+022b 022b d cd8d06
+022b 022b s J170: CALL CPUER
+022e 022e s ;
+022e 022e s ;
+022e 022e s ;
+022e 022e s ;TEST ACCUMULATOR IMMEDIATE INSTRUCTIONS
+022e 022e s ;
+022e 022e d fe00
+022e 022e s AIMM: CPI 0 ;A=F5H,C=0,Z=0
+0230 0230 d da4602
+0230 0230 s JC CPIE ;TEST "CPI" FOR RE-SET CARRY
+0233 0233 d ca4602
+0233 0233 s JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+0236 0236 d fef5
+0236 0236 s CPI 0F5H ;A=F5H,C=0,Z=1
+0238 0238 d da4602
+0238 0238 s JC CPIE ;TEST "CPI" FOR RE-SET CARRY ("ADI")
+023b 023b d c24602
+023b 023b s JNZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+023e 023e d feff
+023e 023e s CPI 0FFH ;A=F5H,C=1,Z=0
+0240 0240 d ca4602
+0240 0240 s JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+0243 0243 d da4902
+0243 0243 s JC ACII ;TEST "CPI" FOR SET CARRY
+0246 0246 d cd8d06
+0246 0246 s CPIE: CALL CPUER
+0249 0249 d ce0a
+0249 0249 s ACII: ACI 00AH ;A=F5H+0AH+CARRY(1)=0,C=1
+024b 024b d ce0a
+024b 024b s ACI 00AH ;A=0+0AH+CARRY(0)=0BH,C=0
+024d 024d d fe0b
+024d 024d s CPI 00BH
+024f 024f d ca5502
+024f 024f s JZ SUII ;TEST "ACI"
+0252 0252 d cd8d06
+0252 0252 s CALL CPUER
+0255 0255 d d60c
+0255 0255 s SUII: SUI 00CH ;A=FFH,C=0
+0257 0257 d d60f
+0257 0257 s SUI 00FH ;A=F0H,C=1
+0259 0259 d fef0
+0259 0259 s CPI 0F0H
+025b 025b d ca6102
+025b 025b s JZ SBII ;TEST "SUI"
+025e 025e d cd8d06
+025e 025e s CALL CPUER
+0261 0261 d def1
+0261 0261 s SBII: SBI 0F1H ;A=F0H-0F1H-CARRY(0)=FFH,C=1
+0263 0263 d de0e
+0263 0263 s SBI 00EH ;A=FFH-OEH-CARRY(1)=F0H,C=0
+0265 0265 d fef0
+0265 0265 s CPI 0F0H
+0267 0267 d ca6d02
+0267 0267 s JZ ANII ;TEST "SBI"
+026a 026a d cd8d06
+026a 026a s CALL CPUER
+026d 026d d e655
+026d 026d s ANII: ANI 055H ;A=F0H55H=50H,C=0,P=1,S=0,Z=0
+026f 026f d fe50
+026f 026f s CPI 050H
+0271 0271 d ca7702
+0271 0271 s JZ ORII ;TEST "ANI"
+0274 0274 d cd8d06
+0274 0274 s CALL CPUER
+0277 0277 d f63a
+0277 0277 s ORII: ORI 03AH ;A=50H3AH=7AH,C=0,P=0,S=0,Z=0
+0279 0279 d fe7a
+0279 0279 s CPI 07AH
+027b 027b d ca8102
+027b 027b s JZ XRII ;TEST "ORI"
+027e 027e d cd8d06
+027e 027e s CALL CPUER
+0281 0281 d ee0f
+0281 0281 s XRII: XRI 00FH ;A=7AH0FH=75H,C=0,P=0,S=0,Z=0
+0283 0283 d fe75
+0283 0283 s CPI 075H
+0285 0285 d ca8b02
+0285 0285 s JZ C010 ;TEST "XRI"
+0288 0288 d cd8d06
+0288 0288 s CALL CPUER
+028b 028b s ;
+028b 028b s ;
+028b 028b s ;
+028b 028b s ;TEST CALLS AND RETURNS
+028b 028b s ;
+028b 028b d e600
+028b 028b s C010: ANI 000H ;A=0,C=0,P=1,S=0,Z=1
+028d 028d d dc8d06
+028d 028d s CC CPUER ;TEST "CC"
+0290 0290 d e48d06
+0290 0290 s CPO CPUER ;TEST "CPO"
+0293 0293 d fc8d06
+0293 0293 s CM CPUER ;TEST "CM"
+0296 0296 d c48d06
+0296 0296 s CNZ CPUER ;TEST "CNZ"
+0299 0299 d fe00
+0299 0299 s CPI 000H
+029b 029b d caa102
+029b 029b s JZ C020 ;A=0,C=0,P=0,S=0,Z=1
+029e 029e d cd8d06
+029e 029e s CALL CPUER
+02a1 02a1 d d677
+02a1 02a1 s C020: SUI 077H ;A=89H,C=1,P=0,S=1,Z=0
+02a3 02a3 d d48d06
+02a3 02a3 s CNC CPUER ;TEST "CNC"
+02a6 02a6 d ec8d06
+02a6 02a6 s CPE CPUER ;TEST "CPE"
+02a9 02a9 d f48d06
+02a9 02a9 s CP CPUER ;TEST "CP"
+02ac 02ac d cc8d06
+02ac 02ac s CZ CPUER ;TEST "CZ"
+02af 02af d fe89
+02af 02af s CPI 089H
+02b1 02b1 d cab702
+02b1 02b1 s JZ C030 ;TEST FOR "CALLS" TAKING BRANCH
+02b4 02b4 d cd8d06
+02b4 02b4 s CALL CPUER
+02b7 02b7 d e6ff
+02b7 02b7 s C030: ANI 0FFH ;SET FLAGS BACK!
+02b9 02b9 d e4c402
+02b9 02b9 s CPO CPOI ;TEST "CPO"
+02bc 02bc d fed9
+02bc 02bc s CPI 0D9H
+02be 02be d ca2103
+02be 02be s JZ MOVI ;TEST "CALL" SEQUENCE SUCCESS
+02c1 02c1 d cd8d06
+02c1 02c1 s CALL CPUER
+02c4 02c4 d e8
+02c4 02c4 s CPOI: RPE ;TEST "RPE"
+02c5 02c5 d c610
+02c5 02c5 s ADI 010H ;A=99H,C=0,P=0,S=1,Z=0
+02c7 02c7 d ecd002
+02c7 02c7 s CPE CPEI ;TEST "CPE"
+02ca 02ca d c602
+02ca 02ca s ADI 002H ;A=D9H,C=0,P=0,S=1,Z=0
+02cc 02cc d e0
+02cc 02cc s RPO ;TEST "RPO"
+02cd 02cd d cd8d06
+02cd 02cd s CALL CPUER
+02d0 02d0 d e0
+02d0 02d0 s CPEI: RPO ;TEST "RPO"
+02d1 02d1 d c620
+02d1 02d1 s ADI 020H ;A=B9H,C=0,P=0,S=1,Z=0
+02d3 02d3 d fcdc02
+02d3 02d3 s CM CMI ;TEST "CM"
+02d6 02d6 d c604
+02d6 02d6 s ADI 004H ;A=D7H,C=0,P=1,S=1,Z=0
+02d8 02d8 d e8
+02d8 02d8 s RPE ;TEST "RPE"
+02d9 02d9 d cd8d06
+02d9 02d9 s CALL CPUER
+02dc 02dc d f0
+02dc 02dc s CMI: RP ;TEST "RP"
+02dd 02dd d c680
+02dd 02dd s ADI 080H ;A=39H,C=1,P=1,S=0,Z=0
+02df 02df d f4e802
+02df 02df s CP TCPI ;TEST "CP"
+02e2 02e2 d c680
+02e2 02e2 s ADI 080H ;A=D3H,C=0,P=0,S=1,Z=0
+02e4 02e4 d f8
+02e4 02e4 s RM ;TEST "RM"
+02e5 02e5 d cd8d06
+02e5 02e5 s CALL CPUER
+02e8 02e8 d f8
+02e8 02e8 s TCPI: RM ;TEST "RM"
+02e9 02e9 d c640
+02e9 02e9 s ADI 040H ;A=79H,C=0,P=0,S=0,Z=0
+02eb 02eb d d4f402
+02eb 02eb s CNC CNCI ;TEST "CNC"
+02ee 02ee d c640
+02ee 02ee s ADI 040H ;A=53H,C=0,P=1,S=0,Z=0
+02f0 02f0 d f0
+02f0 02f0 s RP ;TEST "RP"
+02f1 02f1 d cd8d06
+02f1 02f1 s CALL CPUER
+02f4 02f4 d d8
+02f4 02f4 s CNCI: RC ;TEST "RC"
+02f5 02f5 d c68f
+02f5 02f5 s ADI 08FH ;A=08H,C=1,P=0,S=0,Z=0
+02f7 02f7 d dc0003
+02f7 02f7 s CC CCI ;TEST "CC"
+02fa 02fa d d602
+02fa 02fa s SUI 002H ;A=13H,C=0,P=0,S=0,Z=0
+02fc 02fc d d0
+02fc 02fc s RNC ;TEST "RNC"
+02fd 02fd d cd8d06
+02fd 02fd s CALL CPUER
+0300 0300 d d0
+0300 0300 s CCI: RNC ;TEST "RNC"
+0301 0301 d c6f7
+0301 0301 s ADI 0F7H ;A=FFH,C=0,P=1,S=1,Z=0
+0303 0303 d c40c03
+0303 0303 s CNZ CNZI ;TEST "CNZ"
+0306 0306 d c6fe
+0306 0306 s ADI 0FEH ;A=15H,C=1,P=0,S=0,Z=0
+0308 0308 d d8
+0308 0308 s RC ;TEST "RC"
+0309 0309 d cd8d06
+0309 0309 s CALL CPUER
+030c 030c d c8
+030c 030c s CNZI: RZ ;TEST "RZ"
+030d 030d d c601
+030d 030d s ADI 001H ;A=00H,C=1,P=1,S=0,Z=1
+030f 030f d cc1803
+030f 030f s CZ CZI ;TEST "CZ"
+0312 0312 d c6d0
+0312 0312 s ADI 0D0H ;A=17H,C=1,P=1,S=0,Z=0
+0314 0314 d c0
+0314 0314 s RNZ ;TEST "RNZ"
+0315 0315 d cd8d06
+0315 0315 s CALL CPUER
+0318 0318 d c0
+0318 0318 s CZI: RNZ ;TEST "RNZ"
+0319 0319 d c647
+0319 0319 s ADI 047H ;A=47H,C=0,P=1,S=0,Z=0
+031b 031b d fe47
+031b 031b s CPI 047H ;A=47H,C=0,P=1,S=0,Z=1
+031d 031d d c8
+031d 031d s RZ ;TEST "RZ"
+031e 031e d cd8d06
+031e 031e s CALL CPUER
+0321 0321 s ;
+0321 0321 s ;
+0321 0321 s ;
+0321 0321 s ;TEST "MOV","INR",AND "DCR" INSTRUCTIONS
+0321 0321 s ;
+0321 0321 d 3e77
+0321 0321 s MOVI: MVI A,077H
+0323 0323 d 3c
+0323 0323 s INR A
+0324 0324 d 47
+0324 0324 s MOV B,A
+0325 0325 d 04
+0325 0325 s INR B
+0326 0326 d 48
+0326 0326 s MOV C,B
+0327 0327 d 0d
+0327 0327 s DCR C
+0328 0328 d 51
+0328 0328 s MOV D,C
+0329 0329 d 5a
+0329 0329 s MOV E,D
+032a 032a d 63
+032a 032a s MOV H,E
+032b 032b d 6c
+032b 032b s MOV L,H
+032c 032c d 7d
+032c 032c s MOV A,L ;TEST "MOV" A,L,H,E,D,C,B,A
+032d 032d d 3d
+032d 032d s DCR A
+032e 032e d 4f
+032e 032e s MOV C,A
+032f 032f d 59
+032f 032f s MOV E,C
+0330 0330 d 6b
+0330 0330 s MOV L,E
+0331 0331 d 45
+0331 0331 s MOV B,L
+0332 0332 d 50
+0332 0332 s MOV D,B
+0333 0333 d 62
+0333 0333 s MOV H,D
+0334 0334 d 7c
+0334 0334 s MOV A,H ;TEST "MOV" A,H,D,B,L,E,C,A
+0335 0335 d 57
+0335 0335 s MOV D,A
+0336 0336 d 14
+0336 0336 s INR D
+0337 0337 d 6a
+0337 0337 s MOV L,D
+0338 0338 d 4d
+0338 0338 s MOV C,L
+0339 0339 d 0c
+0339 0339 s INR C
+033a 033a d 61
+033a 033a s MOV H,C
+033b 033b d 44
+033b 033b s MOV B,H
+033c 033c d 05
+033c 033c s DCR B
+033d 033d d 58
+033d 033d s MOV E,B
+033e 033e d 7b
+033e 033e s MOV A,E ;TEST "MOV" A,E,B,H,C,L,D,A
+033f 033f d 5f
+033f 033f s MOV E,A
+0340 0340 d 1c
+0340 0340 s INR E
+0341 0341 d 43
+0341 0341 s MOV B,E
+0342 0342 d 60
+0342 0342 s MOV H,B
+0343 0343 d 24
+0343 0343 s INR H
+0344 0344 d 4c
+0344 0344 s MOV C,H
+0345 0345 d 69
+0345 0345 s MOV L,C
+0346 0346 d 55
+0346 0346 s MOV D,L
+0347 0347 d 15
+0347 0347 s DCR D
+0348 0348 d 7a
+0348 0348 s MOV A,D ;TEST "MOV" A,D,L,C,H,B,E,A
+0349 0349 d 67
+0349 0349 s MOV H,A
+034a 034a d 25
+034a 034a s DCR H
+034b 034b d 54
+034b 034b s MOV D,H
+034c 034c d 42
+034c 034c s MOV B,D
+034d 034d d 68
+034d 034d s MOV L,B
+034e 034e d 2c
+034e 034e s INR L
+034f 034f d 5d
+034f 034f s MOV E,L
+0350 0350 d 1d
+0350 0350 s DCR E
+0351 0351 d 4b
+0351 0351 s MOV C,E
+0352 0352 d 79
+0352 0352 s MOV A,C ;TEST "MOV" A,C,E,L,B,D,H,A
+0353 0353 d 6f
+0353 0353 s MOV L,A
+0354 0354 d 2d
+0354 0354 s DCR L
+0355 0355 d 65
+0355 0355 s MOV H,L
+0356 0356 d 5c
+0356 0356 s MOV E,H
+0357 0357 d 53
+0357 0357 s MOV D,E
+0358 0358 d 4a
+0358 0358 s MOV C,D
+0359 0359 d 41
+0359 0359 s MOV B,C
+035a 035a d 78
+035a 035a s MOV A,B
+035b 035b d fe77
+035b 035b s CPI 077H
+035d 035d d c48d06
+035d 035d s CNZ CPUER ;TEST "MOV" A,B,C,D,E,H,L,A
+0360 0360 s ;
+0360 0360 s ;
+0360 0360 s ;
+0360 0360 s ;TEST ARITHMETIC AND LOGIC INSTRUCTIONS
+0360 0360 s ;
+0360 0360 d af
+0360 0360 s XRA A
+0361 0361 d 0601
+0361 0361 s MVI B,001H
+0363 0363 d 0e03
+0363 0363 s MVI C,003H
+0365 0365 d 1607
+0365 0365 s MVI D,007H
+0367 0367 d 1e0f
+0367 0367 s MVI E,00FH
+0369 0369 d 261f
+0369 0369 s MVI H,01FH
+036b 036b d 2e3f
+036b 036b s MVI L,03FH
+036d 036d d 80
+036d 036d s ADD B
+036e 036e d 81
+036e 036e s ADD C
+036f 036f d 82
+036f 036f s ADD D
+0370 0370 d 83
+0370 0370 s ADD E
+0371 0371 d 84
+0371 0371 s ADD H
+0372 0372 d 85
+0372 0372 s ADD L
+0373 0373 d 87
+0373 0373 s ADD A
+0374 0374 d fef0
+0374 0374 s CPI 0F0H
+0376 0376 d c48d06
+0376 0376 s CNZ CPUER ;TEST "ADD" B,C,D,E,H,L,A
+0379 0379 d 90
+0379 0379 s SUB B
+037a 037a d 91
+037a 037a s SUB C
+037b 037b d 92
+037b 037b s SUB D
+037c 037c d 93
+037c 037c s SUB E
+037d 037d d 94
+037d 037d s SUB H
+037e 037e d 95
+037e 037e s SUB L
+037f 037f d fe78
+037f 037f s CPI 078H
+0381 0381 d c48d06
+0381 0381 s CNZ CPUER ;TEST "SUB" B,C,D,E,H,L
+0384 0384 d 97
+0384 0384 s SUB A
+0385 0385 d c48d06
+0385 0385 s CNZ CPUER ;TEST "SUB" A
+0388 0388 d 3e80
+0388 0388 s MVI A,080H
+038a 038a d 87
+038a 038a s ADD A
+038b 038b d 0601
+038b 038b s MVI B,001H
+038d 038d d 0e02
+038d 038d s MVI C,002H
+038f 038f d 1603
+038f 038f s MVI D,003H
+0391 0391 d 1e04
+0391 0391 s MVI E,004H
+0393 0393 d 2605
+0393 0393 s MVI H,005H
+0395 0395 d 2e06
+0395 0395 s MVI L,006H
+0397 0397 d 88
+0397 0397 s ADC B
+0398 0398 d 0680
+0398 0398 s MVI B,080H
+039a 039a d 80
+039a 039a s ADD B
+039b 039b d 80
+039b 039b s ADD B
+039c 039c d 89
+039c 039c s ADC C
+039d 039d d 80
+039d 039d s ADD B
+039e 039e d 80
+039e 039e s ADD B
+039f 039f d 8a
+039f 039f s ADC D
+03a0 03a0 d 80
+03a0 03a0 s ADD B
+03a1 03a1 d 80
+03a1 03a1 s ADD B
+03a2 03a2 d 8b
+03a2 03a2 s ADC E
+03a3 03a3 d 80
+03a3 03a3 s ADD B
+03a4 03a4 d 80
+03a4 03a4 s ADD B
+03a5 03a5 d 8c
+03a5 03a5 s ADC H
+03a6 03a6 d 80
+03a6 03a6 s ADD B
+03a7 03a7 d 80
+03a7 03a7 s ADD B
+03a8 03a8 d 8d
+03a8 03a8 s ADC L
+03a9 03a9 d 80
+03a9 03a9 s ADD B
+03aa 03aa d 80
+03aa 03aa s ADD B
+03ab 03ab d 8f
+03ab 03ab s ADC A
+03ac 03ac d fe37
+03ac 03ac s CPI 037H
+03ae 03ae d c48d06
+03ae 03ae s CNZ CPUER ;TEST "ADC" B,C,D,E,H,L,A
+03b1 03b1 d 3e80
+03b1 03b1 s MVI A,080H
+03b3 03b3 d 87
+03b3 03b3 s ADD A
+03b4 03b4 d 0601
+03b4 03b4 s MVI B,001H
+03b6 03b6 d 98
+03b6 03b6 s SBB B
+03b7 03b7 d 06ff
+03b7 03b7 s MVI B,0FFH
+03b9 03b9 d 80
+03b9 03b9 s ADD B
+03ba 03ba d 99
+03ba 03ba s SBB C
+03bb 03bb d 80
+03bb 03bb s ADD B
+03bc 03bc d 9a
+03bc 03bc s SBB D
+03bd 03bd d 80
+03bd 03bd s ADD B
+03be 03be d 9b
+03be 03be s SBB E
+03bf 03bf d 80
+03bf 03bf s ADD B
+03c0 03c0 d 9c
+03c0 03c0 s SBB H
+03c1 03c1 d 80
+03c1 03c1 s ADD B
+03c2 03c2 d 9d
+03c2 03c2 s SBB L
+03c3 03c3 d fee0
+03c3 03c3 s CPI 0E0H
+03c5 03c5 d c48d06
+03c5 03c5 s CNZ CPUER ;TEST "SBB" B,C,D,E,H,L
+03c8 03c8 d 3e80
+03c8 03c8 s MVI A,080H
+03ca 03ca d 87
+03ca 03ca s ADD A
+03cb 03cb d 9f
+03cb 03cb s SBB A
+03cc 03cc d feff
+03cc 03cc s CPI 0FFH
+03ce 03ce d c48d06
+03ce 03ce s CNZ CPUER ;TEST "SBB" A
+03d1 03d1 d 3eff
+03d1 03d1 s MVI A,0FFH
+03d3 03d3 d 06fe
+03d3 03d3 s MVI B,0FEH
+03d5 03d5 d 0efc
+03d5 03d5 s MVI C,0FCH
+03d7 03d7 d 16ef
+03d7 03d7 s MVI D,0EFH
+03d9 03d9 d 1e7f
+03d9 03d9 s MVI E,07FH
+03db 03db d 26f4
+03db 03db s MVI H,0F4H
+03dd 03dd d 2ebf
+03dd 03dd s MVI L,0BFH
+03df 03df d a7
+03df 03df s ANA A
+03e0 03e0 d a1
+03e0 03e0 s ANA C
+03e1 03e1 d a2
+03e1 03e1 s ANA D
+03e2 03e2 d a3
+03e2 03e2 s ANA E
+03e3 03e3 d a4
+03e3 03e3 s ANA H
+03e4 03e4 d a5
+03e4 03e4 s ANA L
+03e5 03e5 d a7
+03e5 03e5 s ANA A
+03e6 03e6 d fe24
+03e6 03e6 s CPI 024H
+03e8 03e8 d c48d06
+03e8 03e8 s CNZ CPUER ;TEST "ANA" B,C,D,E,H,L,A
+03eb 03eb d af
+03eb 03eb s XRA A
+03ec 03ec d 0601
+03ec 03ec s MVI B,001H
+03ee 03ee d 0e02
+03ee 03ee s MVI C,002H
+03f0 03f0 d 1604
+03f0 03f0 s MVI D,004H
+03f2 03f2 d 1e08
+03f2 03f2 s MVI E,008H
+03f4 03f4 d 2610
+03f4 03f4 s MVI H,010H
+03f6 03f6 d 2e20
+03f6 03f6 s MVI L,020H
+03f8 03f8 d b0
+03f8 03f8 s ORA B
+03f9 03f9 d b1
+03f9 03f9 s ORA C
+03fa 03fa d b2
+03fa 03fa s ORA D
+03fb 03fb d b3
+03fb 03fb s ORA E
+03fc 03fc d b4
+03fc 03fc s ORA H
+03fd 03fd d b5
+03fd 03fd s ORA L
+03fe 03fe d b7
+03fe 03fe s ORA A
+03ff 03ff d fe3f
+03ff 03ff s CPI 03FH
+0401 0401 d c48d06
+0401 0401 s CNZ CPUER ;TEST "ORA" B,C,D,E,H,L,A
+0404 0404 d 3e00
+0404 0404 s MVI A,000H
+0406 0406 d 268f
+0406 0406 s MVI H,08FH
+0408 0408 d 2e4f
+0408 0408 s MVI L,04FH
+040a 040a d a8
+040a 040a s XRA B
+040b 040b d a9
+040b 040b s XRA C
+040c 040c d aa
+040c 040c s XRA D
+040d 040d d ab
+040d 040d s XRA E
+040e 040e d ac
+040e 040e s XRA H
+040f 040f d ad
+040f 040f s XRA L
+0410 0410 d fecf
+0410 0410 s CPI 0CFH
+0412 0412 d c48d06
+0412 0412 s CNZ CPUER ;TEST "XRA" B,C,D,E,H,L
+0415 0415 d af
+0415 0415 s XRA A
+0416 0416 d c48d06
+0416 0416 s CNZ CPUER ;TEST "XRA" A
+0419 0419 d 0644
+0419 0419 s MVI B,044H
+041b 041b d 0e45
+041b 041b s MVI C,045H
+041d 041d d 1646
+041d 041d s MVI D,046H
+041f 041f d 1e47
+041f 041f s MVI E,047H
+0421 0421 s ;MVI H,(TEMP0 / 0FFH) ;HIGH BYTE OF TEST MEMORY LOCATION
+0421 0421 d 26ff
+0421 0421 s MVI H,(TEMP0 >> 8) ;HIGH BYTE OF TEST MEMORY LOCATION
+0423 0423 d 2e02
+0423 0423 s MVI L,(TEMP0 AND 0FFH) ;LOW BYTE OF TEST MEMORY LOCATION
+0425 0425 d 70
+0425 0425 s MOV M,B
+0426 0426 d 0600
+0426 0426 s MVI B,000H
+0428 0428 d 46
+0428 0428 s MOV B,M
+0429 0429 d 3e44
+0429 0429 s MVI A,044H
+042b 042b d b8
+042b 042b s CMP B
+042c 042c d c48d06
+042c 042c s CNZ CPUER ;TEST "MOV" M,B AND B,M
+042f 042f d 72
+042f 042f s MOV M,D
+0430 0430 d 1600
+0430 0430 s MVI D,000H
+0432 0432 d 56
+0432 0432 s MOV D,M
+0433 0433 d 3e46
+0433 0433 s MVI A,046H
+0435 0435 d ba
+0435 0435 s CMP D
+0436 0436 d c48d06
+0436 0436 s CNZ CPUER ;TEST "MOV" M,D AND D,M
+0439 0439 d 73
+0439 0439 s MOV M,E
+043a 043a d 1e00
+043a 043a s MVI E,000H
+043c 043c d 5e
+043c 043c s MOV E,M
+043d 043d d 3e47
+043d 043d s MVI A,047H
+043f 043f d bb
+043f 043f s CMP E
+0440 0440 d c48d06
+0440 0440 s CNZ CPUER ;TEST "MOV" M,E AND E,M
+0443 0443 d 74
+0443 0443 s MOV M,H
+0444 0444 s ;MVI H,(TEMP0 / 0FFH)
+0444 0444 d 26ff
+0444 0444 s MVI H,(TEMP0 >> 8)
+0446 0446 d 2e02
+0446 0446 s MVI L,(TEMP0 AND 0FFH)
+0448 0448 d 66
+0448 0448 s MOV H,M
+0449 0449 s ;MVI A,(TEMP0 / 0FFH)
+0449 0449 d 3eff
+0449 0449 s MVI A,(TEMP0 >> 8)
+044b 044b d bc
+044b 044b s CMP H
+044c 044c d c48d06
+044c 044c s CNZ CPUER ;TEST "MOV" M,H AND H,M
+044f 044f d 75
+044f 044f s MOV M,L
+0450 0450 s ;MVI H,(TEMP0 / 0FFH)
+0450 0450 d 26ff
+0450 0450 s MVI H,(TEMP0 >> 8)
+0452 0452 d 2e02
+0452 0452 s MVI L,(TEMP0 AND 0FFH)
+0454 0454 d 6e
+0454 0454 s MOV L,M
+0455 0455 d 3e02
+0455 0455 s MVI A,(TEMP0 AND 0FFH)
+0457 0457 d bd
+0457 0457 s CMP L
+0458 0458 d c48d06
+0458 0458 s CNZ CPUER ;TEST "MOV" M,L AND L,M
+045b 045b s ;MVI H,(TEMP0 / 0FFH)
+045b 045b d 26ff
+045b 045b s MVI H,(TEMP0 >> 8)
+045d 045d d 2e02
+045d 045d s MVI L,(TEMP0 AND 0FFH)
+045f 045f d 3e32
+045f 045f s MVI A,032H
+0461 0461 d 77
+0461 0461 s MOV M,A
+0462 0462 d be
+0462 0462 s CMP M
+0463 0463 d c48d06
+0463 0463 s CNZ CPUER ;TEST "MOV" M,A
+0466 0466 d 86
+0466 0466 s ADD M
+0467 0467 d fe64
+0467 0467 s CPI 064H
+0469 0469 d c48d06
+0469 0469 s CNZ CPUER ;TEST "ADD" M
+046c 046c d af
+046c 046c s XRA A
+046d 046d d 7e
+046d 046d s MOV A,M
+046e 046e d fe32
+046e 046e s CPI 032H
+0470 0470 d c48d06
+0470 0470 s CNZ CPUER ;TEST "MOV" A,M
+0473 0473 s ;MVI H,(TEMP0 / 0FFH)
+0473 0473 d 26ff
+0473 0473 s MVI H,(TEMP0 >> 8)
+0475 0475 d 2e02
+0475 0475 s MVI L,(TEMP0 AND 0FFH)
+0477 0477 d 7e
+0477 0477 s MOV A,M
+0478 0478 d 96
+0478 0478 s SUB M
+0479 0479 d c48d06
+0479 0479 s CNZ CPUER ;TEST "SUB" M
+047c 047c d 3e80
+047c 047c s MVI A,080H
+047e 047e d 87
+047e 047e s ADD A
+047f 047f d 8e
+047f 047f s ADC M
+0480 0480 d fe33
+0480 0480 s CPI 033H
+0482 0482 d c48d06
+0482 0482 s CNZ CPUER ;TEST "ADC" M
+0485 0485 d 3e80
+0485 0485 s MVI A,080H
+0487 0487 d 87
+0487 0487 s ADD A
+0488 0488 d 9e
+0488 0488 s SBB M
+0489 0489 d fecd
+0489 0489 s CPI 0CDH
+048b 048b d c48d06
+048b 048b s CNZ CPUER ;TEST "SBB" M
+048e 048e d a6
+048e 048e s ANA M
+048f 048f d c48d06
+048f 048f s CNZ CPUER ;TEST "ANA" M
+0492 0492 d 3e25
+0492 0492 s MVI A,025H
+0494 0494 d b6
+0494 0494 s ORA M
+0495 0495 d fe37
+0495 0495 s CPI 037H
+0497 0497 d c48d06
+0497 0497 s CNZ CPUER ;TEST "ORA" M
+049a 049a d ae
+049a 049a s XRA M
+049b 049b d fe05
+049b 049b s CPI 005H
+049d 049d d c48d06
+049d 049d s CNZ CPUER ;TEST "XRA" M
+04a0 04a0 d 3655
+04a0 04a0 s MVI M,055H
+04a2 04a2 d 34
+04a2 04a2 s INR M
+04a3 04a3 d 35
+04a3 04a3 s DCR M
+04a4 04a4 d 86
+04a4 04a4 s ADD M
+04a5 04a5 d fe5a
+04a5 04a5 s CPI 05AH
+04a7 04a7 d c48d06
+04a7 04a7 s CNZ CPUER ;TEST "INR","DCR",AND "MVI" M
+04aa 04aa d 01ff12
+04aa 04aa s LXI B,12FFH
+04ad 04ad d 11ff12
+04ad 04ad s LXI D,12FFH
+04b0 04b0 d 21ff12
+04b0 04b0 s LXI H,12FFH
+04b3 04b3 d 03
+04b3 04b3 s INX B
+04b4 04b4 d 13
+04b4 04b4 s INX D
+04b5 04b5 d 23
+04b5 04b5 s INX H
+04b6 04b6 d 3e13
+04b6 04b6 s MVI A,013H
+04b8 04b8 d b8
+04b8 04b8 s CMP B
+04b9 04b9 d c48d06
+04b9 04b9 s CNZ CPUER ;TEST "LXI" AND "INX" B
+04bc 04bc d ba
+04bc 04bc s CMP D
+04bd 04bd d c48d06
+04bd 04bd s CNZ CPUER ;TEST "LXI" AND "INX" D
+04c0 04c0 d bc
+04c0 04c0 s CMP H
+04c1 04c1 d c48d06
+04c1 04c1 s CNZ CPUER ;TEST "LXI" AND "INX" H
+04c4 04c4 d 3e00
+04c4 04c4 s MVI A,000H
+04c6 04c6 d b9
+04c6 04c6 s CMP C
+04c7 04c7 d c48d06
+04c7 04c7 s CNZ CPUER ;TEST "LXI" AND "INX" B
+04ca 04ca d bb
+04ca 04ca s CMP E
+04cb 04cb d c48d06
+04cb 04cb s CNZ CPUER ;TEST "LXI" AND "INX" D
+04ce 04ce d bd
+04ce 04ce s CMP L
+04cf 04cf d c48d06
+04cf 04cf s CNZ CPUER ;TEST "LXI" AND "INX" H
+04d2 04d2 d 0b
+04d2 04d2 s DCX B
+04d3 04d3 d 1b
+04d3 04d3 s DCX D
+04d4 04d4 d 2b
+04d4 04d4 s DCX H
+04d5 04d5 d 3e12
+04d5 04d5 s MVI A,012H
+04d7 04d7 d b8
+04d7 04d7 s CMP B
+04d8 04d8 d c48d06
+04d8 04d8 s CNZ CPUER ;TEST "DCX" B
+04db 04db d ba
+04db 04db s CMP D
+04dc 04dc d c48d06
+04dc 04dc s CNZ CPUER ;TEST "DCX" D
+04df 04df d bc
+04df 04df s CMP H
+04e0 04e0 d c48d06
+04e0 04e0 s CNZ CPUER ;TEST "DCX" H
+04e3 04e3 d 3eff
+04e3 04e3 s MVI A,0FFH
+04e5 04e5 d b9
+04e5 04e5 s CMP C
+04e6 04e6 d c48d06
+04e6 04e6 s CNZ CPUER ;TEST "DCX" B
+04e9 04e9 d bb
+04e9 04e9 s CMP E
+04ea 04ea d c48d06
+04ea 04ea s CNZ CPUER ;TEST "DCX" D
+04ed 04ed d bd
+04ed 04ed s CMP L
+04ee 04ee d c48d06
+04ee 04ee s CNZ CPUER ;TEST "DCX" H
+04f1 04f1 d 3202ff
+04f1 04f1 s STA TEMP0
+04f4 04f4 d af
+04f4 04f4 s XRA A
+04f5 04f5 d 3a02ff
+04f5 04f5 s LDA TEMP0
+04f8 04f8 d feff
+04f8 04f8 s CPI 0FFH
+04fa 04fa d c48d06
+04fa 04fa s CNZ CPUER ;TEST "LDA" AND "STA"
+04fd 04fd d 2a00ff
+04fd 04fd s LHLD TEMPP
+0500 0500 d 2202ff
+0500 0500 s SHLD TEMP0
+0503 0503 d 3a00ff
+0503 0503 s LDA TEMPP
+0506 0506 d 47
+0506 0506 s MOV B,A
+0507 0507 d 3a02ff
+0507 0507 s LDA TEMP0
+050a 050a d b8
+050a 050a s CMP B
+050b 050b d c48d06
+050b 050b s CNZ CPUER ;TEST "LHLD" AND "SHLD"
+050e 050e d 3a01ff
+050e 050e s LDA TEMPP+1
+0511 0511 d 47
+0511 0511 s MOV B,A
+0512 0512 d 3a03ff
+0512 0512 s LDA TEMP0+1
+0515 0515 d b8
+0515 0515 s CMP B
+0516 0516 d c48d06
+0516 0516 s CNZ CPUER ;TEST "LHLD" AND "SHLD"
+0519 0519 d 3eaa
+0519 0519 s MVI A,0AAH
+051b 051b d 3202ff
+051b 051b s STA TEMP0
+051e 051e d 44
+051e 051e s MOV B,H
+051f 051f d 4d
+051f 051f s MOV C,L
+0520 0520 d af
+0520 0520 s XRA A
+0521 0521 d 0a
+0521 0521 s LDAX B
+0522 0522 d feaa
+0522 0522 s CPI 0AAH
+0524 0524 d c48d06
+0524 0524 s CNZ CPUER ;TEST "LDAX" B
+0527 0527 d 3c
+0527 0527 s INR A
+0528 0528 d 02
+0528 0528 s STAX B
+0529 0529 d 3a02ff
+0529 0529 s LDA TEMP0
+052c 052c d feab
+052c 052c s CPI 0ABH
+052e 052e d c48d06
+052e 052e s CNZ CPUER ;TEST "STAX" B
+0531 0531 d 3e77
+0531 0531 s MVI A,077H
+0533 0533 d 3202ff
+0533 0533 s STA TEMP0
+0536 0536 d 2a00ff
+0536 0536 s LHLD TEMPP
+0539 0539 d 110000
+0539 0539 s LXI D,00000H
+053c 053c d eb
+053c 053c s XCHG
+053d 053d d af
+053d 053d s XRA A
+053e 053e d 1a
+053e 053e s LDAX D
+053f 053f d fe77
+053f 053f s CPI 077H
+0541 0541 d c48d06
+0541 0541 s CNZ CPUER ;TEST "LDAX" D AND "XCHG"
+0544 0544 d af
+0544 0544 s XRA A
+0545 0545 d 84
+0545 0545 s ADD H
+0546 0546 d 85
+0546 0546 s ADD L
+0547 0547 d c48d06
+0547 0547 s CNZ CPUER ;TEST "XCHG"
+054a 054a d 3ecc
+054a 054a s MVI A,0CCH
+054c 054c d 12
+054c 054c s STAX D
+054d 054d d 3a02ff
+054d 054d s LDA TEMP0
+0550 0550 d fecc
+0550 0550 s CPI 0CCH
+0552 0552 d 12
+0552 0552 s STAX D
+0553 0553 d 3a02ff
+0553 0553 s LDA TEMP0
+0556 0556 d fecc
+0556 0556 s CPI 0CCH
+0558 0558 d c48d06
+0558 0558 s CNZ CPUER ;TEST "STAX" D
+055b 055b d 217777
+055b 055b s LXI H,07777H
+055e 055e d 29
+055e 055e s DAD H
+055f 055f d 3eee
+055f 055f s MVI A,0EEH
+0561 0561 d bc
+0561 0561 s CMP H
+0562 0562 d c48d06
+0562 0562 s CNZ CPUER ;TEST "DAD" H
+0565 0565 d bd
+0565 0565 s CMP L
+0566 0566 d c48d06
+0566 0566 s CNZ CPUER ;TEST "DAD" H
+0569 0569 d 215555
+0569 0569 s LXI H,05555H
+056c 056c d 01ffff
+056c 056c s LXI B,0FFFFH
+056f 056f d 09
+056f 056f s DAD B
+0570 0570 d 3e55
+0570 0570 s MVI A,055H
+0572 0572 d d48d06
+0572 0572 s CNC CPUER ;TEST "DAD" B
+0575 0575 d bc
+0575 0575 s CMP H
+0576 0576 d c48d06
+0576 0576 s CNZ CPUER ;TEST "DAD" B
+0579 0579 d 3e54
+0579 0579 s MVI A,054H
+057b 057b d bd
+057b 057b s CMP L
+057c 057c d c48d06
+057c 057c s CNZ CPUER ;TEST "DAD" B
+057f 057f d 21aaaa
+057f 057f s LXI H,0AAAAH
+0582 0582 d 113333
+0582 0582 s LXI D,03333H
+0585 0585 d 19
+0585 0585 s DAD D
+0586 0586 d 3edd
+0586 0586 s MVI A,0DDH
+0588 0588 d bc
+0588 0588 s CMP H
+0589 0589 d c48d06
+0589 0589 s CNZ CPUER ;TEST "DAD" D
+058c 058c d bd
+058c 058c s CMP L
+058d 058d d c48d06
+058d 058d s CNZ CPUER ;TEST "DAD" B
+0590 0590 d 37
+0590 0590 s STC
+0591 0591 d d48d06
+0591 0591 s CNC CPUER ;TEST "STC"
+0594 0594 d 3f
+0594 0594 s CMC
+0595 0595 d dc8d06
+0595 0595 s CC CPUER ;TEST "CMC
+0598 0598 d 3eaa
+0598 0598 s MVI A,0AAH
+059a 059a d 2f
+059a 059a s CMA
+059b 059b d fe55
+059b 059b s CPI 055H
+059d 059d d c48d06
+059d 059d s CNZ CPUER ;TEST "CMA"
+05a0 05a0 d b7
+05a0 05a0 s ORA A ;RE-SET AUXILIARY CARRY
+05a1 05a1 d 27
+05a1 05a1 s DAA
+05a2 05a2 d fe55
+05a2 05a2 s CPI 055H
+05a4 05a4 d c48d06
+05a4 05a4 s CNZ CPUER ;TEST "DAA"
+05a7 05a7 d 3e88
+05a7 05a7 s MVI A,088H
+05a9 05a9 d 87
+05a9 05a9 s ADD A
+05aa 05aa d 27
+05aa 05aa s DAA
+05ab 05ab d fe76
+05ab 05ab s CPI 076H
+05ad 05ad d c48d06
+05ad 05ad s CNZ CPUER ;TEST "DAA"
+05b0 05b0 d af
+05b0 05b0 s XRA A
+05b1 05b1 d 3eaa
+05b1 05b1 s MVI A,0AAH
+05b3 05b3 d 27
+05b3 05b3 s DAA
+05b4 05b4 d d48d06
+05b4 05b4 s CNC CPUER ;TEST "DAA"
+05b7 05b7 d fe10
+05b7 05b7 s CPI 010H
+05b9 05b9 d c48d06
+05b9 05b9 s CNZ CPUER ;TEST "DAA"
+05bc 05bc d af
+05bc 05bc s XRA A
+05bd 05bd d 3e9a
+05bd 05bd s MVI A,09AH
+05bf 05bf d 27
+05bf 05bf s DAA
+05c0 05c0 d d48d06
+05c0 05c0 s CNC CPUER ;TEST "DAA"
+05c3 05c3 d c48d06
+05c3 05c3 s CNZ CPUER ;TEST "DAA"
+05c6 05c6 d 37
+05c6 05c6 s STC
+05c7 05c7 d 3e42
+05c7 05c7 s MVI A,042H
+05c9 05c9 d 07
+05c9 05c9 s RLC
+05ca 05ca d dc8d06
+05ca 05ca s CC CPUER ;TEST "RLC" FOR RE-SET CARRY
+05cd 05cd d 07
+05cd 05cd s RLC
+05ce 05ce d d48d06
+05ce 05ce s CNC CPUER ;TEST "RLC" FOR SET CARRY
+05d1 05d1 d fe09
+05d1 05d1 s CPI 009H
+05d3 05d3 d c48d06
+05d3 05d3 s CNZ CPUER ;TEST "RLC" FOR ROTATION
+05d6 05d6 d 0f
+05d6 05d6 s RRC
+05d7 05d7 d d48d06
+05d7 05d7 s CNC CPUER ;TEST "RRC" FOR SET CARRY
+05da 05da d 0f
+05da 05da s RRC
+05db 05db d fe42
+05db 05db s CPI 042H
+05dd 05dd d c48d06
+05dd 05dd s CNZ CPUER ;TEST "RRC" FOR ROTATION
+05e0 05e0 d 17
+05e0 05e0 s RAL
+05e1 05e1 d 17
+05e1 05e1 s RAL
+05e2 05e2 d d48d06
+05e2 05e2 s CNC CPUER ;TEST "RAL" FOR SET CARRY
+05e5 05e5 d fe08
+05e5 05e5 s CPI 008H
+05e7 05e7 d c48d06
+05e7 05e7 s CNZ CPUER ;TEST "RAL" FOR ROTATION
+05ea 05ea d 1f
+05ea 05ea s RAR
+05eb 05eb d 1f
+05eb 05eb s RAR
+05ec 05ec d dc8d06
+05ec 05ec s CC CPUER ;TEST "RAR" FOR RE-SET CARRY
+05ef 05ef d fe02
+05ef 05ef s CPI 002H
+05f1 05f1 d c48d06
+05f1 05f1 s CNZ CPUER ;TEST "RAR" FOR ROTATION
+05f4 05f4 d 013412
+05f4 05f4 s LXI B,01234H
+05f7 05f7 d 11aaaa
+05f7 05f7 s LXI D,0AAAAH
+05fa 05fa d 215555
+05fa 05fa s LXI H,05555H
+05fd 05fd d af
+05fd 05fd s XRA A
+05fe 05fe d c5
+05fe 05fe s PUSH B
+05ff 05ff d d5
+05ff 05ff s PUSH D
+0600 0600 d e5
+0600 0600 s PUSH H
+0601 0601 d f5
+0601 0601 s PUSH PSW
+0602 0602 d 010000
+0602 0602 s LXI B,00000H
+0605 0605 d 110000
+0605 0605 s LXI D,00000H
+0608 0608 d 210000
+0608 0608 s LXI H,00000H
+060b 060b d 3ec0
+060b 060b s MVI A,0C0H
+060d 060d d c6f0
+060d 060d s ADI 0F0H
+060f 060f d f1
+060f 060f s POP PSW
+0610 0610 d e1
+0610 0610 s POP H
+0611 0611 d d1
+0611 0611 s POP D
+0612 0612 d c1
+0612 0612 s POP B
+0613 0613 d dc8d06
+0613 0613 s CC CPUER ;TEST "PUSH PSW" AND "POP PSW"
+0616 0616 d c48d06
+0616 0616 s CNZ CPUER ;TEST "PUSH PSW" AND "POP PSW"
+0619 0619 d e48d06
+0619 0619 s CPO CPUER ;TEST "PUSH PSW" AND "POP PSW"
+061c 061c d fc8d06
+061c 061c s CM CPUER ;TEST "PUSH PSW" AND "POP PSW"
+061f 061f d 3e12
+061f 061f s MVI A,012H
+0621 0621 d b8
+0621 0621 s CMP B
+0622 0622 d c48d06
+0622 0622 s CNZ CPUER ;TEST "PUSH B" AND "POP B"
+0625 0625 d 3e34
+0625 0625 s MVI A,034H
+0627 0627 d b9
+0627 0627 s CMP C
+0628 0628 d c48d06
+0628 0628 s CNZ CPUER ;TEST "PUSH B" AND "POP B"
+062b 062b d 3eaa
+062b 062b s MVI A,0AAH
+062d 062d d ba
+062d 062d s CMP D
+062e 062e d c48d06
+062e 062e s CNZ CPUER ;TEST "PUSH D" AND "POP D"
+0631 0631 d bb
+0631 0631 s CMP E
+0632 0632 d c48d06
+0632 0632 s CNZ CPUER ;TEST "PUSH D" AND "POP D"
+0635 0635 d 3e55
+0635 0635 s MVI A,055H
+0637 0637 d bc
+0637 0637 s CMP H
+0638 0638 d c48d06
+0638 0638 s CNZ CPUER ;TEST "PUSH H" AND "POP H"
+063b 063b d bd
+063b 063b s CMP L
+063c 063c d c48d06
+063c 063c s CNZ CPUER ;TEST "PUSH H" AND "POP H"
+063f 063f d 210000
+063f 063f s LXI H,00000H
+0642 0642 d 39
+0642 0642 s DAD SP
+0643 0643 d 2207ff
+0643 0643 s SHLD SAVSTK ;SAVE THE "OLD" STACK-POINTER!
+0646 0646 d 3106ff
+0646 0646 s LXI SP,TEMP4
+0649 0649 d 3b
+0649 0649 s DCX SP
+064a 064a d 3b
+064a 064a s DCX SP
+064b 064b d 33
+064b 064b s INX SP
+064c 064c d 3b
+064c 064c s DCX SP
+064d 064d d 3e55
+064d 064d s MVI A,055H
+064f 064f d 3204ff
+064f 064f s STA TEMP2
+0652 0652 d 2f
+0652 0652 s CMA
+0653 0653 d 3205ff
+0653 0653 s STA TEMP3
+0656 0656 d c1
+0656 0656 s POP B
+0657 0657 d b8
+0657 0657 s CMP B
+0658 0658 d c48d06
+0658 0658 s CNZ CPUER ;TEST "LXI","DAD","INX",AND "DCX" SP
+065b 065b d 2f
+065b 065b s CMA
+065c 065c d b9
+065c 065c s CMP C
+065d 065d d c48d06
+065d 065d s CNZ CPUER ;TEST "LXI","DAD","INX", AND "DCX" SP
+0660 0660 d 2106ff
+0660 0660 s LXI H,TEMP4
+0663 0663 d f9
+0663 0663 s SPHL
+0664 0664 d 213377
+0664 0664 s LXI H,07733H
+0667 0667 d 3b
+0667 0667 s DCX SP
+0668 0668 d 3b
+0668 0668 s DCX SP
+0669 0669 d e3
+0669 0669 s XTHL
+066a 066a d 3a05ff
+066a 066a s LDA TEMP3
+066d 066d d fe77
+066d 066d s CPI 077H
+066f 066f d c48d06
+066f 066f s CNZ CPUER ;TEST "SPHL" AND "XTHL"
+0672 0672 d 3a04ff
+0672 0672 s LDA TEMP2
+0675 0675 d fe33
+0675 0675 s CPI 033H
+0677 0677 d c48d06
+0677 0677 s CNZ CPUER ;TEST "SPHL" AND "XTHL"
+067a 067a d 3e55
+067a 067a s MVI A,055H
+067c 067c d bd
+067c 067c s CMP L
+067d 067d d c48d06
+067d 067d s CNZ CPUER ;TEST "SPHL" AND "XTHL"
+0680 0680 d 2f
+0680 0680 s CMA
+0681 0681 d bc
+0681 0681 s CMP H
+0682 0682 d c48d06
+0682 0682 s CNZ CPUER ;TEST "SPHL" AND "XTHL"
+0685 0685 d 2a07ff
+0685 0685 s LHLD SAVSTK ;RESTORE THE "OLD" STACK-POINTER
+0688 0688 d f9
+0688 0688 s SPHL
+0689 0689 d 219f06
+0689 0689 s LXI H,CPUOK
+068c 068c d e9
+068c 068c s PCHL ;TEST "PCHL"
+068d 068d s ;
+068d 068d s ;
+068d 068d s ;
+068d 068d d 218c01
+068d 068d s CPUER: LXI H,NGCPU ;OUTPUT "CPU HAS FAILED ERROR EXIT=" TO CONSOLE
+0690 0690 d cd4601
+0690 0690 s CALL MSG
+0693 0693 d e3
+0693 0693 s XTHL
+0694 0694 d 7c
+0694 0694 s MOV A,H
+0695 0695 d cd5501
+0695 0695 s CALL BYTEO ;SHOW ERROR EXIT ADDRESS HIGH BYTE
+0698 0698 d 7d
+0698 0698 s MOV A,L
+0699 0699 d cd5501
+0699 0699 s CALL BYTEO ;SHOW ERROR EXIT ADDRESS LOW BYTE
+069c 069c d c30000
+069c 069c s JMP WBOOT ;EXIT TO CP/M WARM BOOT
+069f 069f s ;
+069f 069f s ;
+069f 069f s ;
+069f 069f d 217501
+069f 069f s CPUOK: LXI H,OKCPU ;OUTPUT "CPU IS OPERATIONAL" TO CONSOLE
+06a2 06a2 d cd4601
+06a2 06a2 s CALL MSG
+06a5 06a5 d c30000
+06a5 06a5 s JMP WBOOT ;EXIT TO CP/M WARM BOOT
+06a8 06a8 s ;
+06a8 06a8 s ; -------- RAM is implemented in top 256 bytes of the address space -------
+ff00 ff00 s ORG 0FF00H
+ff00 ff00 s ;
+ff00 ff00 d 02ff
+ff00 ff00 s TEMPP: DW TEMP0 ;POINTER USED TO TEST "LHLD","SHLD",
+ff02 ff02 s ; AND "LDAX" INSTRUCTIONS
+ff02 ff02 s ;
+ff02 ff02 s TEMP0: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ff03 ff03 s TEMP1: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ff04 ff04 s TEMP2 DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ff05 ff05 s TEMP3: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ff06 ff06 s TEMP4: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ff07 ff07 s SAVSTK: DS 2 ;TEMPORARY STACK-POINTER STORAGE LOCATION
+ff09 ff09 s ;
+ff09 ff09 s ;
+ff09 ff09 s ;
+ff09 ff09 s STACK EQU TEMPP+128 ;DE-BUG STACK POINTER STORAGE AREA
+ff09 ff09 s ;
+ff09 ff09 s ;
+ff09 ff09 s ;
+ff09 ff09 s END
+028b a c010
+02a1 a c020
+02b7 a c030
+01ba a j010
+01c0 a j020
+01c6 a j030
+01cc a j040
+01db a j050
+01de a j060
+01e6 a j070
+01ef a j080
+01f2 a j090
+01fa a j100
+0203 a j110
+0206 a j120
+020e a j130
+0217 a j140
+021a a j150
+0222 a j160
+022b a j170
+0300 a cci
+02dc a cmi
+0318 a czi
+0146 a msg
+01af a cpu
+0249 a acii
+02f4 a cnci
+0246 a cpie
+026d a anii
+02d0 a cpei
+022e a aimm
+0026 a done
+0261 a sbii
+0005 v bdos
+02c4 a cpoi
+02e8 a tcpi
+0277 a orii
+0028 a init
+030c a cnzi
+0255 a suii
+0321 a movi
+0281 a xrii
+ff02 a temp0
+ff03 a temp1
+ff04 a temp2
+ff05 a temp3
+ff06 a temp4
+0165 a byto1
+0169 a byto2
+0172 a byto3
+014f a pchar
+ff80 v stack
+018c a ngcpu
+068d a cpuer
+0175 a okcpu
+0155 a byteo
+069f a cpuok
+ff00 a tempp
+0000 v wboot
+ff07 a savstk
+0014 a c_write
+001a a c_writestr
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.bds
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cim
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cim
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cim (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cim (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cim
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cmd
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cmd (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.cmd
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.hex
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.hex (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.hex (revision 3)
@@ -0,0 +1,97 @@
+:04000000F3C328001E
+:10000500F579FE02CA1400FE09CA1A00C326007B50
+:10001500D300C326001AFE24CA2600D30013C31A30
+:0C00250000F1C92100002BF9FBC3AF0162
+:10010000C3AF014D4943524F434F534D20415353C9
+:100110004F43494154455320383038302F38303818
+:10012000352043505520444941474E4F535449438D
+:100130002056455253494F4E20312E30202028431F
+:10014000292031393830D5EB0E09CD0500D1C90E43
+:1001500002CD0500C9F5CD65015FCD4F01F1CD6937
+:10016000015FC34F010F0F0F0FE60FFE0AFA720176
+:10017000C607C630C90C0D0A2043505520495320EC
+:100180004F5045524154494F4E414C240C0D0A20CA
+:1001900043505520484153204641494C4544212075
+:1001A0002020204552524F5220455849543D243179
+:1001B00080FFE600CABA01CD8D06D2C001CD8D0602
+:1001C000EAC601CD8D06F2CC01CD8D06C2DB01DA87
+:1001D000DB01E2DB01FADB01C3DE01CD8D06C606E1
+:1001E000C2E601CD8D06DAEF01E2EF01F2F201CDB8
+:1001F0008D06C670E2FA01CD8D06FA0302CA03022B
+:10020000D20602CD8D06C681FA0E02CD8D06CA1722
+:1002100002DA1702E21A02CD8D06C6FEDA2202CDFC
+:100220008D06CA2B02E22B02FA2E02CD8D06FE00AD
+:10023000DA4602CA4602FEF5DA4602C24602FEFF6E
+:10024000CA4602DA4902CD8D06CE0ACE0AFE0BCA94
+:100250005502CD8D06D60CD60FFEF0CA6102CD8DAB
+:1002600006DEF1DE0EFEF0CA6D02CD8D06E655FE0D
+:1002700050CA7702CD8D06F63AFE7ACA8102CD8D3C
+:1002800006EE0FFE75CA8B02CD8D06E600DC8D06EC
+:10029000E48D06FC8D06C48D06FE00CAA102CD8D3C
+:1002A00006D677D48D06EC8D06F48D06CC8D06FE31
+:1002B00089CAB702CD8D06E6FFE4C402FED9CA2181
+:1002C00003CD8D06E8C610ECD002C602E0CD8D0647
+:1002D000E0C620FCDC02C604E8CD8D06F0C680F442
+:1002E000E802C680F8CD8D06F8C640D4F402C640B8
+:1002F000F0CD8D06D8C68FDC0003D602D0CD8D069A
+:10030000D0C6F7C40C03C6FED8CD8D06C8C601CC36
+:100310001803C6D0C0CD8D06C0C647FE47C8CD8DD8
+:10032000063E773C4704480D515A636C7D3D4F595A
+:100330006B4550627C57146A4D0C614405587B5FD5
+:100340001C4360244C6955157A67255442682C5D1E
+:100350001D4B796F2D655C534A4178FE77C48D063D
+:10036000AF06010E0316071E0F261F2E3F80818247
+:1003700083848587FEF0C48D06909192939495FEB8
+:1003800078C48D0697C48D063E808706010E02163E
+:10039000031E0426052E0688068080808980808AB8
+:1003A00080808B80808C80808D80808FFE37C48D94
+:1003B000063E808706019806FF8099809A809B8080
+:1003C0009C809DFEE0C48D063E80879FFEFFC48D0D
+:1003D000063EFF06FE0EFC16EF1E7F26F42EBFA77C
+:1003E000A1A2A3A4A5A7FE24C48D06AF06010E02F8
+:1003F00016041E0826102E20B0B1B2B3B4B5B7FE55
+:100400003FC48D063E00268F2E4FA8A9AAABACADE7
+:10041000FECFC48D06AFC48D0606440E4516461E9B
+:100420004726FF2E02700600463E44B8C48D067271
+:100430001600563E46BAC48D06731E005E3E47BB8C
+:10044000C48D067426FF2E02663EFFBCC48D067561
+:1004500026FF2E026E3E02BDC48D0626FF2E023EF2
+:100460003277BEC48D0686FE64C48D06AF7EFE3232
+:10047000C48D0626FF2E027E96C48D063E80878E92
+:10048000FE33C48D063E80879EFECDC48D06A6C475
+:100490008D063E25B6FE37C48D06AEFE05C48D061C
+:1004A0003655343586FE5AC48D0601FF1211FF12EF
+:1004B00021FF120313233E13B8C48D06BAC48D0660
+:1004C000BCC48D063E00B9C48D06BBC48D06BDC438
+:1004D0008D060B1B2B3E12B8C48D06BAC48D06BC0C
+:1004E000C48D063EFFB9C48D06BBC48D06BDC48D48
+:1004F000063202FFAF3A02FFFEFFC48D062A00FF5C
+:100500002202FF3A00FF473A02FFB8C48D063A01C3
+:10051000FF473A03FFB8C48D063EAA3202FF444D9E
+:10052000AF0AFEAAC48D063C023A02FFFEABC48DA0
+:10053000063E773202FF2A00FF110000EBAF1AFEE1
+:1005400077C48D06AF8485C48D063ECC123A02FF77
+:10055000FECC123A02FFFECCC48D06217777293EED
+:10056000EEBCC48D06BDC48D0621555501FFFF09A3
+:100570003E55D48D06BCC48D063E54BDC48D0621A7
+:10058000AAAA113333193EDDBCC48D06BDC48D0645
+:1005900037D48D063FDC8D063EAA2FFE55C48D064E
+:1005A000B727FE55C48D063E888727FE76C48D0684
+:1005B000AF3EAA27D48D06FE10C48D06AF3E9A2703
+:1005C000D48D06C48D06373E4207DC8D0607D48DD8
+:1005D00006FE09C48D060FD48D060FFE42C48D069B
+:1005E0001717D48D06FE08C48D061F1FDC8D06FE6E
+:1005F00002C48D0601341211AAAA215555AFC5D5E2
+:10060000E5F50100001100002100003EC0C6F0F138
+:10061000E1D1C1DC8D06C48D06E48D06FC8D063E5D
+:1006200012B8C48D063E34B9C48D063EAABAC48D34
+:1006300006BBC48D063E55BCC48D06BDC48D0621C7
+:100640000000392207FF3106FF3B3B333B3E55326A
+:1006500004FF2F3205FFC1B8C48D062FB9C48D0623
+:100660002106FFF92133773B3BE33A05FFFE77C4D0
+:100670008D063A04FFFE33C48D063E55BDC48D067B
+:100680002FBCC48D062A07FFF9219F06E9218C01A2
+:10069000CD4601E37CCD55017DCD5501C300002140
+:0806A0007501CD4601C3000005
+:02FF000002FFFE
+:0000000000
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.hex
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lcas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lcas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lcas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lcas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lcas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lst
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lst (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lst (revision 3)
@@ -0,0 +1,956 @@
+ 1: ;***********************************************************************
+ 2: ; MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980
+ 3: ;***********************************************************************
+ 4: ;
+ 5: ;DONATED TO THE "SIG/M" CP/M USER'S GROUP BY:
+ 6: ;KELLY SMITH, MICROCOSM ASSOCIATES
+ 7: ;3055 WACO AVENUE
+ 8: ;SIMI VALLEY, CALIFORNIA, 93065
+ 9: ;(805) 527-9321 (MODEM, CP/M-NET (TM))
+ 10: ;(805) 527-0518 (VERBAL)
+ 11: ;
+ 12: - 0005 BDOS EQU 00005H ;BDOS ENTRY TO CP/M
+ 13: - 0000 WBOOT EQU 00000H ;RE-ENTRY TO CP/M WARM BOOT
+ 14: ;
+ 15: ;
+ 16: - 0000 ORG WBOOT; -- CPU starts here after reset
+ 17: 0+4 0000 F3 DI
+ 18: 4+10 0001 C32800 JMP INIT
+ 19: ;
+ 20: ; -- Fake "BDOS", only implement functions 2 and 9 (https://www.seasip.info/Cpm/bdos.html)
+ 21: ;
+ 22: - 0005 ORG BDOS;
+ 23: 14+11 0005 F5 PUSH PSW
+ 24: 25+5 0006 79 MOV A, C
+ 25:
+ 26: 30+7 0007 FE02 CPI 2
+ 27: 37+10 0009 CA1400 JZ C_WRITE
+ 28: 47+7 000C FE09 CPI 9
+ 29: 54+10 000E CA1A00 JZ C_WRITESTR
+ 30: 64+10 0011 C32600 JMP DONE
+ 31:
+ 32: 74+5 0014 7B C_WRITE: MOV A, E
+ 33: 79+10 0015 D300 OUT 00H
+ 34: 89+10 0017 C32600 JMP DONE
+ 35:
+ 36: 99+7 001A 1A C_WRITESTR: LDAX D
+ 37: 106+7 001B FE24 CPI '$'
+ 38: 113+10 001D CA2600 JZ DONE
+ 39: 123+10 0020 D300 OUT 00H
+ 40: 133+5 0022 13 INX D
+ 41: 138+10 0023 C31A00 JMP C_WRITESTR
+ 42:
+ 43: 148+10 0026 F1 DONE: POP PSW
+ 44: 158+10 0027 C9 RET
+ 45:
+ 46: 168+10 0028 210000 INIT: LXI H, 0000H
+ 47: 178+5 002B 2B DCX H
+ 48: 183+5 002C F9 SPHL
+ 49: 188+4 002D FB EI
+ 50: 192+10 002E C3AF01 JMP CPU
+ 51: ;
+ 52: ;
+ 53:
+ 54: - 0100 ORG 00100H
+ 55: ;
+ 56: ;
+ 57: ;
+ 58: 202+10 0100 C3AF01 JMP CPU ;JUMP TO 8080 CPU DIAGNOSTIC
+ 59: ;
+ 60: ;
+ 61: ;
+ 62: - 0103 4D494352 DB 'MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC'
+ 4F434F53
+ 4D204153
+ 534F4349
+ 41544553
+ 20383038
+ 302F3830
+ 38352043
+ 50552044
+ 4941474E
+ 4F535449
+ 43
+ 63: - 0130 20564552 DB ' VERSION 1.0 (C) 1980'
+ 53494F4E
+ 20312E30
+ 20202843
+ 29203139
+ 3830
+ 64: ;
+ 65: ;
+ 66: ;
+ 67:
+ 68: ;
+ 69: ;
+ 70: ;
+ 71: ;MESSAGE OUTPUT ROUTINE
+ 72: ;
+ 73: 212+11 0146 D5 MSG: PUSH D ;EXILE D REG.
+ 74: 223+5 0147 EB XCHG ;SWAP H&L REGS. TO D&E REGS.
+ 75: 228+7 0148 0E09 MVI C,9 ;LET BDOS KNOW WE WANT TO SEND A MESSAGE
+ 76: 235+17 014A CD0500 CALL BDOS
+ 77: 252+10 014D D1 POP D ;BACK FROM EXILE
+ 78: 262+10 014E C9 RET
+ 79: ;
+ 80: ;
+ 81: ;
+ 82: ;CHARACTER OUTPUT ROUTINE
+ 83: ;
+ 84: 272+7 014F 0E02 PCHAR: MVI C,2
+ 85: 279+17 0151 CD0500 CALL BDOS
+ 86: 296+10 0154 C9 RET
+ 87: ;
+ 88: ;
+ 89: ;
+ 90: 306+11 0155 F5 BYTEO: PUSH PSW
+ 91: 317+17 0156 CD6501 CALL BYTO1
+ 92: 334+5 0159 5F MOV E,A
+ 93: 339+17 015A CD4F01 CALL PCHAR
+ 94: 356+10 015D F1 POP PSW
+ 95: 366+17 015E CD6901 CALL BYTO2
+ 96: 383+5 0161 5F MOV E,A
+ 97: 388+10 0162 C34F01 JMP PCHAR
+ 98: 398+4 0165 0F BYTO1: RRC
+ 99: 402+4 0166 0F RRC
+ 100: 406+4 0167 0F RRC
+ 101: 410+4 0168 0F RRC
+ 102: 414+7 0169 E60F BYTO2: ANI 0FH
+ 103: 421+7 016B FE0A CPI 0AH
+ 104: 428+10 016D FA7201 JM BYTO3
+ 105: 438+7 0170 C607 ADI 7
+ 106: 445+7 0172 C630 BYTO3: ADI 30H
+ 107: 452+10 0174 C9 RET
+ 108: ;
+ 109: ;
+ 110: ;
+ 111: ;************************************************************
+ 112: ; MESSAGE TABLE FOR OPERATIONAL CPU TEST
+ 113: ;************************************************************
+ 114: ;
+ 115: - 0175 0C0D0A20 OKCPU: DB 0CH,0DH,0AH,' CPU IS OPERATIONAL$'
+ 43505520
+ 4953204F
+ 50455241
+ 54494F4E
+ 414C24
+ 116: ;
+ 117: - 018C 0C0D0A20 NGCPU: DB 0CH,0DH,0AH,' CPU HAS FAILED! ERROR EXIT=$'
+ 43505520
+ 48415320
+ 4641494C
+ 45442120
+ 20202045
+ 52524F52
+ 20455849
+ 543D24
+ 118: ;
+ 119: ;
+ 120: ;
+ 121: ;************************************************************
+ 122: ; 8080/8085 CPU TEST/DIAGNOSTIC
+ 123: ;************************************************************
+ 124: ;
+ 125: ;NOTE: (1) PROGRAM ASSUMES "CALL",AND "LXI SP" INSTRUCTIONS WORK!
+ 126: ;
+ 127: ; (2) INSTRUCTIONS NOT TESTED ARE "HLT","DI","EI","RIM","SIM",
+ 128: ; AND "RST 0" THRU "RST 7"
+ 129: ;
+ 130: ;
+ 131: ;
+ 132: ;TEST JUMP INSTRUCTIONS AND FLAGS
+ 133: ;
+ 134: 462+10 01AF 3180FF CPU: LXI SP,STACK ;SET THE STACK POINTER
+ 135: 472+7 01B2 E600 ANI 0 ;INITIALIZE A REG. AND CLEAR ALL FLAGS
+ 136: 479+10 01B4 CABA01 JZ J010 ;TEST "JZ"
+ 137: 489+17 01B7 CD8D06 CALL CPUER
+ 138: 506+10 01BA D2C001 J010: JNC J020 ;TEST "JNC"
+ 139: 516+17 01BD CD8D06 CALL CPUER
+ 140: 533+10 01C0 EAC601 J020: JPE J030 ;TEST "JPE"
+ 141: 543+17 01C3 CD8D06 CALL CPUER
+ 142: 560+10 01C6 F2CC01 J030: JP J040 ;TEST "JP"
+ 143: 570+17 01C9 CD8D06 CALL CPUER
+ 144: 587+10 01CC C2DB01 J040: JNZ J050 ;TEST "JNZ"
+ 145: 597+10 01CF DADB01 JC J050 ;TEST "JC"
+ 146: 607+10 01D2 E2DB01 JPO J050 ;TEST "JPO"
+ 147: 617+10 01D5 FADB01 JM J050 ;TEST "JM"
+ 148: 627+10 01D8 C3DE01 JMP J060 ;TEST "JMP" (IT'S A LITTLE LATE,BUT WHAT THE HELL!
+ 149: 637+17 01DB CD8D06 J050: CALL CPUER
+ 150: 654+7 01DE C606 J060: ADI 6 ;A=6,C=0,P=1,S=0,Z=0
+ 151: 661+10 01E0 C2E601 JNZ J070 ;TEST "JNZ"
+ 152: 671+17 01E3 CD8D06 CALL CPUER
+ 153: 688+10 01E6 DAEF01 J070: JC J080 ;TEST "JC"
+ 154: 698+10 01E9 E2EF01 JPO J080 ;TEST "JPO"
+ 155: 708+10 01EC F2F201 JP J090 ;TEST "JP"
+ 156: 718+17 01EF CD8D06 J080: CALL CPUER
+ 157: 735+7 01F2 C670 J090: ADI 070H ;A=76H,C=0,P=0,S=0,Z=0
+ 158: 742+10 01F4 E2FA01 JPO J100 ;TEST "JPO"
+ 159: 752+17 01F7 CD8D06 CALL CPUER
+ 160: 769+10 01FA FA0302 J100: JM J110 ;TEST "JM"
+ 161: 779+10 01FD CA0302 JZ J110 ;TEST "JZ"
+ 162: 789+10 0200 D20602 JNC J120 ;TEST "JNC"
+ 163: 799+17 0203 CD8D06 J110: CALL CPUER
+ 164: 816+7 0206 C681 J120: ADI 081H ;A=F7H,C=0,P=0,S=1,Z=0
+ 165: 823+10 0208 FA0E02 JM J130 ;TEST "JM"
+ 166: 833+17 020B CD8D06 CALL CPUER
+ 167: 850+10 020E CA1702 J130: JZ J140 ;TEST "JZ"
+ 168: 860+10 0211 DA1702 JC J140 ;TEST "JC"
+ 169: 870+10 0214 E21A02 JPO J150 ;TEST "JPO"
+ 170: 880+17 0217 CD8D06 J140: CALL CPUER
+ 171: 897+7 021A C6FE J150: ADI 0FEH ;A=F5H,C=1,P=1,S=1,Z=0
+ 172: 904+10 021C DA2202 JC J160 ;TEST "JC"
+ 173: 914+17 021F CD8D06 CALL CPUER
+ 174: 931+10 0222 CA2B02 J160: JZ J170 ;TEST "JZ"
+ 175: 941+10 0225 E22B02 JPO J170 ;TEST "JPO"
+ 176: 951+10 0228 FA2E02 JM AIMM ;TEST "JM"
+ 177: 961+17 022B CD8D06 J170: CALL CPUER
+ 178: ;
+ 179: ;
+ 180: ;
+ 181: ;TEST ACCUMULATOR IMMEDIATE INSTRUCTIONS
+ 182: ;
+ 183: 978+7 022E FE00 AIMM: CPI 0 ;A=F5H,C=0,Z=0
+ 184: 985+10 0230 DA4602 JC CPIE ;TEST "CPI" FOR RE-SET CARRY
+ 185: 995+10 0233 CA4602 JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ 186: 1005+7 0236 FEF5 CPI 0F5H ;A=F5H,C=0,Z=1
+ 187: 1012+10 0238 DA4602 JC CPIE ;TEST "CPI" FOR RE-SET CARRY ("ADI")
+ 188: 1022+10 023B C24602 JNZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ 189: 1032+7 023E FEFF CPI 0FFH ;A=F5H,C=1,Z=0
+ 190: 1039+10 0240 CA4602 JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ 191: 1049+10 0243 DA4902 JC ACII ;TEST "CPI" FOR SET CARRY
+ 192: 1059+17 0246 CD8D06 CPIE: CALL CPUER
+ 193: 1076+7 0249 CE0A ACII: ACI 00AH ;A=F5H+0AH+CARRY(1)=0,C=1
+ 194: 1083+7 024B CE0A ACI 00AH ;A=0+0AH+CARRY(0)=0BH,C=0
+ 195: 1090+7 024D FE0B CPI 00BH
+ 196: 1097+10 024F CA5502 JZ SUII ;TEST "ACI"
+ 197: 1107+17 0252 CD8D06 CALL CPUER
+ 198: 1124+7 0255 D60C SUII: SUI 00CH ;A=FFH,C=0
+ 199: 1131+7 0257 D60F SUI 00FH ;A=F0H,C=1
+ 200: 1138+7 0259 FEF0 CPI 0F0H
+ 201: 1145+10 025B CA6102 JZ SBII ;TEST "SUI"
+ 202: 1155+17 025E CD8D06 CALL CPUER
+ 203: 1172+7 0261 DEF1 SBII: SBI 0F1H ;A=F0H-0F1H-CARRY(0)=FFH,C=1
+ 204: 1179+7 0263 DE0E SBI 00EH ;A=FFH-OEH-CARRY(1)=F0H,C=0
+ 205: 1186+7 0265 FEF0 CPI 0F0H
+ 206: 1193+10 0267 CA6D02 JZ ANII ;TEST "SBI"
+ 207: 1203+17 026A CD8D06 CALL CPUER
+ 208: 1220+7 026D E655 ANII: ANI 055H ;A=F0H55H=50H,C=0,P=1,S=0,Z=0
+ 209: 1227+7 026F FE50 CPI 050H
+ 210: 1234+10 0271 CA7702 JZ ORII ;TEST "ANI"
+ 211: 1244+17 0274 CD8D06 CALL CPUER
+ 212: 1261+7 0277 F63A ORII: ORI 03AH ;A=50H3AH=7AH,C=0,P=0,S=0,Z=0
+ 213: 1268+7 0279 FE7A CPI 07AH
+ 214: 1275+10 027B CA8102 JZ XRII ;TEST "ORI"
+ 215: 1285+17 027E CD8D06 CALL CPUER
+ 216: 1302+7 0281 EE0F XRII: XRI 00FH ;A=7AH0FH=75H,C=0,P=0,S=0,Z=0
+ 217: 1309+7 0283 FE75 CPI 075H
+ 218: 1316+10 0285 CA8B02 JZ C010 ;TEST "XRI"
+ 219: 1326+17 0288 CD8D06 CALL CPUER
+ 220: ;
+ 221: ;
+ 222: ;
+ 223: ;TEST CALLS AND RETURNS
+ 224: ;
+ 225: 1343+7 028B E600 C010: ANI 000H ;A=0,C=0,P=1,S=0,Z=1
+ 226: 1350+11+6 028D DC8D06 CC CPUER ;TEST "CC"
+ 227: 1361+11+6 0290 E48D06 CPO CPUER ;TEST "CPO"
+ 228: 1372+11+6 0293 FC8D06 CM CPUER ;TEST "CM"
+ 229: 1383+11+6 0296 C48D06 CNZ CPUER ;TEST "CNZ"
+ 230: 1394+7 0299 FE00 CPI 000H
+ 231: 1401+10 029B CAA102 JZ C020 ;A=0,C=0,P=0,S=0,Z=1
+ 232: 1411+17 029E CD8D06 CALL CPUER
+ 233: 1428+7 02A1 D677 C020: SUI 077H ;A=89H,C=1,P=0,S=1,Z=0
+ 234: 1435+11+6 02A3 D48D06 CNC CPUER ;TEST "CNC"
+ 235: 1446+11+6 02A6 EC8D06 CPE CPUER ;TEST "CPE"
+ 236: 1457+11+6 02A9 F48D06 CP CPUER ;TEST "CP"
+ 237: 1468+11+6 02AC CC8D06 CZ CPUER ;TEST "CZ"
+ 238: 1479+7 02AF FE89 CPI 089H
+ 239: 1486+10 02B1 CAB702 JZ C030 ;TEST FOR "CALLS" TAKING BRANCH
+ 240: 1496+17 02B4 CD8D06 CALL CPUER
+ 241: 1513+7 02B7 E6FF C030: ANI 0FFH ;SET FLAGS BACK!
+ 242: 1520+11+6 02B9 E4C402 CPO CPOI ;TEST "CPO"
+ 243: 1531+7 02BC FED9 CPI 0D9H
+ 244: 1538+10 02BE CA2103 JZ MOVI ;TEST "CALL" SEQUENCE SUCCESS
+ 245: 1548+17 02C1 CD8D06 CALL CPUER
+ 246: 1565+5+6 02C4 E8 CPOI: RPE ;TEST "RPE"
+ 247: 1570+7 02C5 C610 ADI 010H ;A=99H,C=0,P=0,S=1,Z=0
+ 248: 1577+11+6 02C7 ECD002 CPE CPEI ;TEST "CPE"
+ 249: 1588+7 02CA C602 ADI 002H ;A=D9H,C=0,P=0,S=1,Z=0
+ 250: 1595+5+6 02CC E0 RPO ;TEST "RPO"
+ 251: 1600+17 02CD CD8D06 CALL CPUER
+ 252: 1617+5+6 02D0 E0 CPEI: RPO ;TEST "RPO"
+ 253: 1622+7 02D1 C620 ADI 020H ;A=B9H,C=0,P=0,S=1,Z=0
+ 254: 1629+11+6 02D3 FCDC02 CM CMI ;TEST "CM"
+ 255: 1640+7 02D6 C604 ADI 004H ;A=D7H,C=0,P=1,S=1,Z=0
+ 256: 1647+5+6 02D8 E8 RPE ;TEST "RPE"
+ 257: 1652+17 02D9 CD8D06 CALL CPUER
+ 258: 1669+5+6 02DC F0 CMI: RP ;TEST "RP"
+ 259: 1674+7 02DD C680 ADI 080H ;A=39H,C=1,P=1,S=0,Z=0
+ 260: 1681+11+6 02DF F4E802 CP TCPI ;TEST "CP"
+ 261: 1692+7 02E2 C680 ADI 080H ;A=D3H,C=0,P=0,S=1,Z=0
+ 262: 1699+5+6 02E4 F8 RM ;TEST "RM"
+ 263: 1704+17 02E5 CD8D06 CALL CPUER
+ 264: 1721+5+6 02E8 F8 TCPI: RM ;TEST "RM"
+ 265: 1726+7 02E9 C640 ADI 040H ;A=79H,C=0,P=0,S=0,Z=0
+ 266: 1733+11+6 02EB D4F402 CNC CNCI ;TEST "CNC"
+ 267: 1744+7 02EE C640 ADI 040H ;A=53H,C=0,P=1,S=0,Z=0
+ 268: 1751+5+6 02F0 F0 RP ;TEST "RP"
+ 269: 1756+17 02F1 CD8D06 CALL CPUER
+ 270: 1773+5+6 02F4 D8 CNCI: RC ;TEST "RC"
+ 271: 1778+7 02F5 C68F ADI 08FH ;A=08H,C=1,P=0,S=0,Z=0
+ 272: 1785+11+6 02F7 DC0003 CC CCI ;TEST "CC"
+ 273: 1796+7 02FA D602 SUI 002H ;A=13H,C=0,P=0,S=0,Z=0
+ 274: 1803+5+6 02FC D0 RNC ;TEST "RNC"
+ 275: 1808+17 02FD CD8D06 CALL CPUER
+ 276: 1825+5+6 0300 D0 CCI: RNC ;TEST "RNC"
+ 277: 1830+7 0301 C6F7 ADI 0F7H ;A=FFH,C=0,P=1,S=1,Z=0
+ 278: 1837+11+6 0303 C40C03 CNZ CNZI ;TEST "CNZ"
+ 279: 1848+7 0306 C6FE ADI 0FEH ;A=15H,C=1,P=0,S=0,Z=0
+ 280: 1855+5+6 0308 D8 RC ;TEST "RC"
+ 281: 1860+17 0309 CD8D06 CALL CPUER
+ 282: 1877+5+6 030C C8 CNZI: RZ ;TEST "RZ"
+ 283: 1882+7 030D C601 ADI 001H ;A=00H,C=1,P=1,S=0,Z=1
+ 284: 1889+11+6 030F CC1803 CZ CZI ;TEST "CZ"
+ 285: 1900+7 0312 C6D0 ADI 0D0H ;A=17H,C=1,P=1,S=0,Z=0
+ 286: 1907+5+6 0314 C0 RNZ ;TEST "RNZ"
+ 287: 1912+17 0315 CD8D06 CALL CPUER
+ 288: 1929+5+6 0318 C0 CZI: RNZ ;TEST "RNZ"
+ 289: 1934+7 0319 C647 ADI 047H ;A=47H,C=0,P=1,S=0,Z=0
+ 290: 1941+7 031B FE47 CPI 047H ;A=47H,C=0,P=1,S=0,Z=1
+ 291: 1948+5+6 031D C8 RZ ;TEST "RZ"
+ 292: 1953+17 031E CD8D06 CALL CPUER
+ 293: ;
+ 294: ;
+ 295: ;
+ 296: ;TEST "MOV","INR",AND "DCR" INSTRUCTIONS
+ 297: ;
+ 298: 1970+7 0321 3E77 MOVI: MVI A,077H
+ 299: 1977+5 0323 3C INR A
+ 300: 1982+5 0324 47 MOV B,A
+ 301: 1987+5 0325 04 INR B
+ 302: 1992+5 0326 48 MOV C,B
+ 303: 1997+5 0327 0D DCR C
+ 304: 2002+5 0328 51 MOV D,C
+ 305: 2007+5 0329 5A MOV E,D
+ 306: 2012+5 032A 63 MOV H,E
+ 307: 2017+5 032B 6C MOV L,H
+ 308: 2022+5 032C 7D MOV A,L ;TEST "MOV" A,L,H,E,D,C,B,A
+ 309: 2027+5 032D 3D DCR A
+ 310: 2032+5 032E 4F MOV C,A
+ 311: 2037+5 032F 59 MOV E,C
+ 312: 2042+5 0330 6B MOV L,E
+ 313: 2047+5 0331 45 MOV B,L
+ 314: 2052+5 0332 50 MOV D,B
+ 315: 2057+5 0333 62 MOV H,D
+ 316: 2062+5 0334 7C MOV A,H ;TEST "MOV" A,H,D,B,L,E,C,A
+ 317: 2067+5 0335 57 MOV D,A
+ 318: 2072+5 0336 14 INR D
+ 319: 2077+5 0337 6A MOV L,D
+ 320: 2082+5 0338 4D MOV C,L
+ 321: 2087+5 0339 0C INR C
+ 322: 2092+5 033A 61 MOV H,C
+ 323: 2097+5 033B 44 MOV B,H
+ 324: 2102+5 033C 05 DCR B
+ 325: 2107+5 033D 58 MOV E,B
+ 326: 2112+5 033E 7B MOV A,E ;TEST "MOV" A,E,B,H,C,L,D,A
+ 327: 2117+5 033F 5F MOV E,A
+ 328: 2122+5 0340 1C INR E
+ 329: 2127+5 0341 43 MOV B,E
+ 330: 2132+5 0342 60 MOV H,B
+ 331: 2137+5 0343 24 INR H
+ 332: 2142+5 0344 4C MOV C,H
+ 333: 2147+5 0345 69 MOV L,C
+ 334: 2152+5 0346 55 MOV D,L
+ 335: 2157+5 0347 15 DCR D
+ 336: 2162+5 0348 7A MOV A,D ;TEST "MOV" A,D,L,C,H,B,E,A
+ 337: 2167+5 0349 67 MOV H,A
+ 338: 2172+5 034A 25 DCR H
+ 339: 2177+5 034B 54 MOV D,H
+ 340: 2182+5 034C 42 MOV B,D
+ 341: 2187+5 034D 68 MOV L,B
+ 342: 2192+5 034E 2C INR L
+ 343: 2197+5 034F 5D MOV E,L
+ 344: 2202+5 0350 1D DCR E
+ 345: 2207+5 0351 4B MOV C,E
+ 346: 2212+5 0352 79 MOV A,C ;TEST "MOV" A,C,E,L,B,D,H,A
+ 347: 2217+5 0353 6F MOV L,A
+ 348: 2222+5 0354 2D DCR L
+ 349: 2227+5 0355 65 MOV H,L
+ 350: 2232+5 0356 5C MOV E,H
+ 351: 2237+5 0357 53 MOV D,E
+ 352: 2242+5 0358 4A MOV C,D
+ 353: 2247+5 0359 41 MOV B,C
+ 354: 2252+5 035A 78 MOV A,B
+ 355: 2257+7 035B FE77 CPI 077H
+ 356: 2264+11+6 035D C48D06 CNZ CPUER ;TEST "MOV" A,B,C,D,E,H,L,A
+ 357: ;
+ 358: ;
+ 359: ;
+ 360: ;TEST ARITHMETIC AND LOGIC INSTRUCTIONS
+ 361: ;
+ 362: 2275+4 0360 AF XRA A
+ 363: 2279+7 0361 0601 MVI B,001H
+ 364: 2286+7 0363 0E03 MVI C,003H
+ 365: 2293+7 0365 1607 MVI D,007H
+ 366: 2300+7 0367 1E0F MVI E,00FH
+ 367: 2307+7 0369 261F MVI H,01FH
+ 368: 2314+7 036B 2E3F MVI L,03FH
+ 369: 2321+4 036D 80 ADD B
+ 370: 2325+4 036E 81 ADD C
+ 371: 2329+4 036F 82 ADD D
+ 372: 2333+4 0370 83 ADD E
+ 373: 2337+4 0371 84 ADD H
+ 374: 2341+4 0372 85 ADD L
+ 375: 2345+4 0373 87 ADD A
+ 376: 2349+7 0374 FEF0 CPI 0F0H
+ 377: 2356+11+6 0376 C48D06 CNZ CPUER ;TEST "ADD" B,C,D,E,H,L,A
+ 378: 2367+4 0379 90 SUB B
+ 379: 2371+4 037A 91 SUB C
+ 380: 2375+4 037B 92 SUB D
+ 381: 2379+4 037C 93 SUB E
+ 382: 2383+4 037D 94 SUB H
+ 383: 2387+4 037E 95 SUB L
+ 384: 2391+7 037F FE78 CPI 078H
+ 385: 2398+11+6 0381 C48D06 CNZ CPUER ;TEST "SUB" B,C,D,E,H,L
+ 386: 2409+4 0384 97 SUB A
+ 387: 2413+11+6 0385 C48D06 CNZ CPUER ;TEST "SUB" A
+ 388: 2424+7 0388 3E80 MVI A,080H
+ 389: 2431+4 038A 87 ADD A
+ 390: 2435+7 038B 0601 MVI B,001H
+ 391: 2442+7 038D 0E02 MVI C,002H
+ 392: 2449+7 038F 1603 MVI D,003H
+ 393: 2456+7 0391 1E04 MVI E,004H
+ 394: 2463+7 0393 2605 MVI H,005H
+ 395: 2470+7 0395 2E06 MVI L,006H
+ 396: 2477+4 0397 88 ADC B
+ 397: 2481+7 0398 0680 MVI B,080H
+ 398: 2488+4 039A 80 ADD B
+ 399: 2492+4 039B 80 ADD B
+ 400: 2496+4 039C 89 ADC C
+ 401: 2500+4 039D 80 ADD B
+ 402: 2504+4 039E 80 ADD B
+ 403: 2508+4 039F 8A ADC D
+ 404: 2512+4 03A0 80 ADD B
+ 405: 2516+4 03A1 80 ADD B
+ 406: 2520+4 03A2 8B ADC E
+ 407: 2524+4 03A3 80 ADD B
+ 408: 2528+4 03A4 80 ADD B
+ 409: 2532+4 03A5 8C ADC H
+ 410: 2536+4 03A6 80 ADD B
+ 411: 2540+4 03A7 80 ADD B
+ 412: 2544+4 03A8 8D ADC L
+ 413: 2548+4 03A9 80 ADD B
+ 414: 2552+4 03AA 80 ADD B
+ 415: 2556+4 03AB 8F ADC A
+ 416: 2560+7 03AC FE37 CPI 037H
+ 417: 2567+11+6 03AE C48D06 CNZ CPUER ;TEST "ADC" B,C,D,E,H,L,A
+ 418: 2578+7 03B1 3E80 MVI A,080H
+ 419: 2585+4 03B3 87 ADD A
+ 420: 2589+7 03B4 0601 MVI B,001H
+ 421: 2596+4 03B6 98 SBB B
+ 422: 2600+7 03B7 06FF MVI B,0FFH
+ 423: 2607+4 03B9 80 ADD B
+ 424: 2611+4 03BA 99 SBB C
+ 425: 2615+4 03BB 80 ADD B
+ 426: 2619+4 03BC 9A SBB D
+ 427: 2623+4 03BD 80 ADD B
+ 428: 2627+4 03BE 9B SBB E
+ 429: 2631+4 03BF 80 ADD B
+ 430: 2635+4 03C0 9C SBB H
+ 431: 2639+4 03C1 80 ADD B
+ 432: 2643+4 03C2 9D SBB L
+ 433: 2647+7 03C3 FEE0 CPI 0E0H
+ 434: 2654+11+6 03C5 C48D06 CNZ CPUER ;TEST "SBB" B,C,D,E,H,L
+ 435: 2665+7 03C8 3E80 MVI A,080H
+ 436: 2672+4 03CA 87 ADD A
+ 437: 2676+4 03CB 9F SBB A
+ 438: 2680+7 03CC FEFF CPI 0FFH
+ 439: 2687+11+6 03CE C48D06 CNZ CPUER ;TEST "SBB" A
+ 440: 2698+7 03D1 3EFF MVI A,0FFH
+ 441: 2705+7 03D3 06FE MVI B,0FEH
+ 442: 2712+7 03D5 0EFC MVI C,0FCH
+ 443: 2719+7 03D7 16EF MVI D,0EFH
+ 444: 2726+7 03D9 1E7F MVI E,07FH
+ 445: 2733+7 03DB 26F4 MVI H,0F4H
+ 446: 2740+7 03DD 2EBF MVI L,0BFH
+ 447: 2747+4 03DF A7 ANA A
+ 448: 2751+4 03E0 A1 ANA C
+ 449: 2755+4 03E1 A2 ANA D
+ 450: 2759+4 03E2 A3 ANA E
+ 451: 2763+4 03E3 A4 ANA H
+ 452: 2767+4 03E4 A5 ANA L
+ 453: 2771+4 03E5 A7 ANA A
+ 454: 2775+7 03E6 FE24 CPI 024H
+ 455: 2782+11+6 03E8 C48D06 CNZ CPUER ;TEST "ANA" B,C,D,E,H,L,A
+ 456: 2793+4 03EB AF XRA A
+ 457: 2797+7 03EC 0601 MVI B,001H
+ 458: 2804+7 03EE 0E02 MVI C,002H
+ 459: 2811+7 03F0 1604 MVI D,004H
+ 460: 2818+7 03F2 1E08 MVI E,008H
+ 461: 2825+7 03F4 2610 MVI H,010H
+ 462: 2832+7 03F6 2E20 MVI L,020H
+ 463: 2839+4 03F8 B0 ORA B
+ 464: 2843+4 03F9 B1 ORA C
+ 465: 2847+4 03FA B2 ORA D
+ 466: 2851+4 03FB B3 ORA E
+ 467: 2855+4 03FC B4 ORA H
+ 468: 2859+4 03FD B5 ORA L
+ 469: 2863+4 03FE B7 ORA A
+ 470: 2867+7 03FF FE3F CPI 03FH
+ 471: 2874+11+6 0401 C48D06 CNZ CPUER ;TEST "ORA" B,C,D,E,H,L,A
+ 472: 2885+7 0404 3E00 MVI A,000H
+ 473: 2892+7 0406 268F MVI H,08FH
+ 474: 2899+7 0408 2E4F MVI L,04FH
+ 475: 2906+4 040A A8 XRA B
+ 476: 2910+4 040B A9 XRA C
+ 477: 2914+4 040C AA XRA D
+ 478: 2918+4 040D AB XRA E
+ 479: 2922+4 040E AC XRA H
+ 480: 2926+4 040F AD XRA L
+ 481: 2930+7 0410 FECF CPI 0CFH
+ 482: 2937+11+6 0412 C48D06 CNZ CPUER ;TEST "XRA" B,C,D,E,H,L
+ 483: 2948+4 0415 AF XRA A
+ 484: 2952+11+6 0416 C48D06 CNZ CPUER ;TEST "XRA" A
+ 485: 2963+7 0419 0644 MVI B,044H
+ 486: 2970+7 041B 0E45 MVI C,045H
+ 487: 2977+7 041D 1646 MVI D,046H
+ 488: 2984+7 041F 1E47 MVI E,047H
+ 489: ;MVI H,(TEMP0 / 0FFH) ;HIGH BYTE OF TEST MEMORY LOCATION
+ 490: 2991+7 0421 26FF MVI H,(TEMP0 >> 8) ;HIGH BYTE OF TEST MEMORY LOCATION
+ 491: 2998+7 0423 2E02 MVI L,(TEMP0 AND 0FFH) ;LOW BYTE OF TEST MEMORY LOCATION
+ 492: 3005+7 0425 70 MOV M,B
+ 493: 3012+7 0426 0600 MVI B,000H
+ 494: 3019+7 0428 46 MOV B,M
+ 495: 3026+7 0429 3E44 MVI A,044H
+ 496: 3033+4 042B B8 CMP B
+ 497: 3037+11+6 042C C48D06 CNZ CPUER ;TEST "MOV" M,B AND B,M
+ 498: 3048+7 042F 72 MOV M,D
+ 499: 3055+7 0430 1600 MVI D,000H
+ 500: 3062+7 0432 56 MOV D,M
+ 501: 3069+7 0433 3E46 MVI A,046H
+ 502: 3076+4 0435 BA CMP D
+ 503: 3080+11+6 0436 C48D06 CNZ CPUER ;TEST "MOV" M,D AND D,M
+ 504: 3091+7 0439 73 MOV M,E
+ 505: 3098+7 043A 1E00 MVI E,000H
+ 506: 3105+7 043C 5E MOV E,M
+ 507: 3112+7 043D 3E47 MVI A,047H
+ 508: 3119+4 043F BB CMP E
+ 509: 3123+11+6 0440 C48D06 CNZ CPUER ;TEST "MOV" M,E AND E,M
+ 510: 3134+7 0443 74 MOV M,H
+ 511: ;MVI H,(TEMP0 / 0FFH)
+ 512: 3141+7 0444 26FF MVI H,(TEMP0 >> 8)
+ 513: 3148+7 0446 2E02 MVI L,(TEMP0 AND 0FFH)
+ 514: 3155+7 0448 66 MOV H,M
+ 515: ;MVI A,(TEMP0 / 0FFH)
+ 516: 3162+7 0449 3EFF MVI A,(TEMP0 >> 8)
+ 517: 3169+4 044B BC CMP H
+ 518: 3173+11+6 044C C48D06 CNZ CPUER ;TEST "MOV" M,H AND H,M
+ 519: 3184+7 044F 75 MOV M,L
+ 520: ;MVI H,(TEMP0 / 0FFH)
+ 521: 3191+7 0450 26FF MVI H,(TEMP0 >> 8)
+ 522: 3198+7 0452 2E02 MVI L,(TEMP0 AND 0FFH)
+ 523: 3205+7 0454 6E MOV L,M
+ 524: 3212+7 0455 3E02 MVI A,(TEMP0 AND 0FFH)
+ 525: 3219+4 0457 BD CMP L
+ 526: 3223+11+6 0458 C48D06 CNZ CPUER ;TEST "MOV" M,L AND L,M
+ 527: ;MVI H,(TEMP0 / 0FFH)
+ 528: 3234+7 045B 26FF MVI H,(TEMP0 >> 8)
+ 529: 3241+7 045D 2E02 MVI L,(TEMP0 AND 0FFH)
+ 530: 3248+7 045F 3E32 MVI A,032H
+ 531: 3255+7 0461 77 MOV M,A
+ 532: 3262+7 0462 BE CMP M
+ 533: 3269+11+6 0463 C48D06 CNZ CPUER ;TEST "MOV" M,A
+ 534: 3280+7 0466 86 ADD M
+ 535: 3287+7 0467 FE64 CPI 064H
+ 536: 3294+11+6 0469 C48D06 CNZ CPUER ;TEST "ADD" M
+ 537: 3305+4 046C AF XRA A
+ 538: 3309+7 046D 7E MOV A,M
+ 539: 3316+7 046E FE32 CPI 032H
+ 540: 3323+11+6 0470 C48D06 CNZ CPUER ;TEST "MOV" A,M
+ 541: ;MVI H,(TEMP0 / 0FFH)
+ 542: 3334+7 0473 26FF MVI H,(TEMP0 >> 8)
+ 543: 3341+7 0475 2E02 MVI L,(TEMP0 AND 0FFH)
+ 544: 3348+7 0477 7E MOV A,M
+ 545: 3355+7 0478 96 SUB M
+ 546: 3362+11+6 0479 C48D06 CNZ CPUER ;TEST "SUB" M
+ 547: 3373+7 047C 3E80 MVI A,080H
+ 548: 3380+4 047E 87 ADD A
+ 549: 3384+7 047F 8E ADC M
+ 550: 3391+7 0480 FE33 CPI 033H
+ 551: 3398+11+6 0482 C48D06 CNZ CPUER ;TEST "ADC" M
+ 552: 3409+7 0485 3E80 MVI A,080H
+ 553: 3416+4 0487 87 ADD A
+ 554: 3420+7 0488 9E SBB M
+ 555: 3427+7 0489 FECD CPI 0CDH
+ 556: 3434+11+6 048B C48D06 CNZ CPUER ;TEST "SBB" M
+ 557: 3445+7 048E A6 ANA M
+ 558: 3452+11+6 048F C48D06 CNZ CPUER ;TEST "ANA" M
+ 559: 3463+7 0492 3E25 MVI A,025H
+ 560: 3470+7 0494 B6 ORA M
+ 561: 3477+7 0495 FE37 CPI 037H
+ 562: 3484+11+6 0497 C48D06 CNZ CPUER ;TEST "ORA" M
+ 563: 3495+7 049A AE XRA M
+ 564: 3502+7 049B FE05 CPI 005H
+ 565: 3509+11+6 049D C48D06 CNZ CPUER ;TEST "XRA" M
+ 566: 3520+10 04A0 3655 MVI M,055H
+ 567: 3530+10 04A2 34 INR M
+ 568: 3540+10 04A3 35 DCR M
+ 569: 3550+7 04A4 86 ADD M
+ 570: 3557+7 04A5 FE5A CPI 05AH
+ 571: 3564+11+6 04A7 C48D06 CNZ CPUER ;TEST "INR","DCR",AND "MVI" M
+ 572: 3575+10 04AA 01FF12 LXI B,12FFH
+ 573: 3585+10 04AD 11FF12 LXI D,12FFH
+ 574: 3595+10 04B0 21FF12 LXI H,12FFH
+ 575: 3605+5 04B3 03 INX B
+ 576: 3610+5 04B4 13 INX D
+ 577: 3615+5 04B5 23 INX H
+ 578: 3620+7 04B6 3E13 MVI A,013H
+ 579: 3627+4 04B8 B8 CMP B
+ 580: 3631+11+6 04B9 C48D06 CNZ CPUER ;TEST "LXI" AND "INX" B
+ 581: 3642+4 04BC BA CMP D
+ 582: 3646+11+6 04BD C48D06 CNZ CPUER ;TEST "LXI" AND "INX" D
+ 583: 3657+4 04C0 BC CMP H
+ 584: 3661+11+6 04C1 C48D06 CNZ CPUER ;TEST "LXI" AND "INX" H
+ 585: 3672+7 04C4 3E00 MVI A,000H
+ 586: 3679+4 04C6 B9 CMP C
+ 587: 3683+11+6 04C7 C48D06 CNZ CPUER ;TEST "LXI" AND "INX" B
+ 588: 3694+4 04CA BB CMP E
+ 589: 3698+11+6 04CB C48D06 CNZ CPUER ;TEST "LXI" AND "INX" D
+ 590: 3709+4 04CE BD CMP L
+ 591: 3713+11+6 04CF C48D06 CNZ CPUER ;TEST "LXI" AND "INX" H
+ 592: 3724+5 04D2 0B DCX B
+ 593: 3729+5 04D3 1B DCX D
+ 594: 3734+5 04D4 2B DCX H
+ 595: 3739+7 04D5 3E12 MVI A,012H
+ 596: 3746+4 04D7 B8 CMP B
+ 597: 3750+11+6 04D8 C48D06 CNZ CPUER ;TEST "DCX" B
+ 598: 3761+4 04DB BA CMP D
+ 599: 3765+11+6 04DC C48D06 CNZ CPUER ;TEST "DCX" D
+ 600: 3776+4 04DF BC CMP H
+ 601: 3780+11+6 04E0 C48D06 CNZ CPUER ;TEST "DCX" H
+ 602: 3791+7 04E3 3EFF MVI A,0FFH
+ 603: 3798+4 04E5 B9 CMP C
+ 604: 3802+11+6 04E6 C48D06 CNZ CPUER ;TEST "DCX" B
+ 605: 3813+4 04E9 BB CMP E
+ 606: 3817+11+6 04EA C48D06 CNZ CPUER ;TEST "DCX" D
+ 607: 3828+4 04ED BD CMP L
+ 608: 3832+11+6 04EE C48D06 CNZ CPUER ;TEST "DCX" H
+ 609: 3843+13 04F1 3202FF STA TEMP0
+ 610: 3856+4 04F4 AF XRA A
+ 611: 3860+13 04F5 3A02FF LDA TEMP0
+ 612: 3873+7 04F8 FEFF CPI 0FFH
+ 613: 3880+11+6 04FA C48D06 CNZ CPUER ;TEST "LDA" AND "STA"
+ 614: 3891+16 04FD 2A00FF LHLD TEMPP
+ 615: 3907+16 0500 2202FF SHLD TEMP0
+ 616: 3923+13 0503 3A00FF LDA TEMPP
+ 617: 3936+5 0506 47 MOV B,A
+ 618: 3941+13 0507 3A02FF LDA TEMP0
+ 619: 3954+4 050A B8 CMP B
+ 620: 3958+11+6 050B C48D06 CNZ CPUER ;TEST "LHLD" AND "SHLD"
+ 621: 3969+13 050E 3A01FF LDA TEMPP+1
+ 622: 3982+5 0511 47 MOV B,A
+ 623: 3987+13 0512 3A03FF LDA TEMP0+1
+ 624: 4000+4 0515 B8 CMP B
+ 625: 4004+11+6 0516 C48D06 CNZ CPUER ;TEST "LHLD" AND "SHLD"
+ 626: 4015+7 0519 3EAA MVI A,0AAH
+ 627: 4022+13 051B 3202FF STA TEMP0
+ 628: 4035+5 051E 44 MOV B,H
+ 629: 4040+5 051F 4D MOV C,L
+ 630: 4045+4 0520 AF XRA A
+ 631: 4049+7 0521 0A LDAX B
+ 632: 4056+7 0522 FEAA CPI 0AAH
+ 633: 4063+11+6 0524 C48D06 CNZ CPUER ;TEST "LDAX" B
+ 634: 4074+5 0527 3C INR A
+ 635: 4079+7 0528 02 STAX B
+ 636: 4086+13 0529 3A02FF LDA TEMP0
+ 637: 4099+7 052C FEAB CPI 0ABH
+ 638: 4106+11+6 052E C48D06 CNZ CPUER ;TEST "STAX" B
+ 639: 4117+7 0531 3E77 MVI A,077H
+ 640: 4124+13 0533 3202FF STA TEMP0
+ 641: 4137+16 0536 2A00FF LHLD TEMPP
+ 642: 4153+10 0539 110000 LXI D,00000H
+ 643: 4163+5 053C EB XCHG
+ 644: 4168+4 053D AF XRA A
+ 645: 4172+7 053E 1A LDAX D
+ 646: 4179+7 053F FE77 CPI 077H
+ 647: 4186+11+6 0541 C48D06 CNZ CPUER ;TEST "LDAX" D AND "XCHG"
+ 648: 4197+4 0544 AF XRA A
+ 649: 4201+4 0545 84 ADD H
+ 650: 4205+4 0546 85 ADD L
+ 651: 4209+11+6 0547 C48D06 CNZ CPUER ;TEST "XCHG"
+ 652: 4220+7 054A 3ECC MVI A,0CCH
+ 653: 4227+7 054C 12 STAX D
+ 654: 4234+13 054D 3A02FF LDA TEMP0
+ 655: 4247+7 0550 FECC CPI 0CCH
+ 656: 4254+7 0552 12 STAX D
+ 657: 4261+13 0553 3A02FF LDA TEMP0
+ 658: 4274+7 0556 FECC CPI 0CCH
+ 659: 4281+11+6 0558 C48D06 CNZ CPUER ;TEST "STAX" D
+ 660: 4292+10 055B 217777 LXI H,07777H
+ 661: 4302+10 055E 29 DAD H
+ 662: 4312+7 055F 3EEE MVI A,0EEH
+ 663: 4319+4 0561 BC CMP H
+ 664: 4323+11+6 0562 C48D06 CNZ CPUER ;TEST "DAD" H
+ 665: 4334+4 0565 BD CMP L
+ 666: 4338+11+6 0566 C48D06 CNZ CPUER ;TEST "DAD" H
+ 667: 4349+10 0569 215555 LXI H,05555H
+ 668: 4359+10 056C 01FFFF LXI B,0FFFFH
+ 669: 4369+10 056F 09 DAD B
+ 670: 4379+7 0570 3E55 MVI A,055H
+ 671: 4386+11+6 0572 D48D06 CNC CPUER ;TEST "DAD" B
+ 672: 4397+4 0575 BC CMP H
+ 673: 4401+11+6 0576 C48D06 CNZ CPUER ;TEST "DAD" B
+ 674: 4412+7 0579 3E54 MVI A,054H
+ 675: 4419+4 057B BD CMP L
+ 676: 4423+11+6 057C C48D06 CNZ CPUER ;TEST "DAD" B
+ 677: 4434+10 057F 21AAAA LXI H,0AAAAH
+ 678: 4444+10 0582 113333 LXI D,03333H
+ 679: 4454+10 0585 19 DAD D
+ 680: 4464+7 0586 3EDD MVI A,0DDH
+ 681: 4471+4 0588 BC CMP H
+ 682: 4475+11+6 0589 C48D06 CNZ CPUER ;TEST "DAD" D
+ 683: 4486+4 058C BD CMP L
+ 684: 4490+11+6 058D C48D06 CNZ CPUER ;TEST "DAD" B
+ 685: 4501+4 0590 37 STC
+ 686: 4505+11+6 0591 D48D06 CNC CPUER ;TEST "STC"
+ 687: 4516+4 0594 3F CMC
+ 688: 4520+11+6 0595 DC8D06 CC CPUER ;TEST "CMC
+ 689: 4531+7 0598 3EAA MVI A,0AAH
+ 690: 4538+4 059A 2F CMA
+ 691: 4542+7 059B FE55 CPI 055H
+ 692: 4549+11+6 059D C48D06 CNZ CPUER ;TEST "CMA"
+ 693: 4560+4 05A0 B7 ORA A ;RE-SET AUXILIARY CARRY
+ 694: 4564+4 05A1 27 DAA
+ 695: 4568+7 05A2 FE55 CPI 055H
+ 696: 4575+11+6 05A4 C48D06 CNZ CPUER ;TEST "DAA"
+ 697: 4586+7 05A7 3E88 MVI A,088H
+ 698: 4593+4 05A9 87 ADD A
+ 699: 4597+4 05AA 27 DAA
+ 700: 4601+7 05AB FE76 CPI 076H
+ 701: 4608+11+6 05AD C48D06 CNZ CPUER ;TEST "DAA"
+ 702: 4619+4 05B0 AF XRA A
+ 703: 4623+7 05B1 3EAA MVI A,0AAH
+ 704: 4630+4 05B3 27 DAA
+ 705: 4634+11+6 05B4 D48D06 CNC CPUER ;TEST "DAA"
+ 706: 4645+7 05B7 FE10 CPI 010H
+ 707: 4652+11+6 05B9 C48D06 CNZ CPUER ;TEST "DAA"
+ 708: 4663+4 05BC AF XRA A
+ 709: 4667+7 05BD 3E9A MVI A,09AH
+ 710: 4674+4 05BF 27 DAA
+ 711: 4678+11+6 05C0 D48D06 CNC CPUER ;TEST "DAA"
+ 712: 4689+11+6 05C3 C48D06 CNZ CPUER ;TEST "DAA"
+ 713: 4700+4 05C6 37 STC
+ 714: 4704+7 05C7 3E42 MVI A,042H
+ 715: 4711+4 05C9 07 RLC
+ 716: 4715+11+6 05CA DC8D06 CC CPUER ;TEST "RLC" FOR RE-SET CARRY
+ 717: 4726+4 05CD 07 RLC
+ 718: 4730+11+6 05CE D48D06 CNC CPUER ;TEST "RLC" FOR SET CARRY
+ 719: 4741+7 05D1 FE09 CPI 009H
+ 720: 4748+11+6 05D3 C48D06 CNZ CPUER ;TEST "RLC" FOR ROTATION
+ 721: 4759+4 05D6 0F RRC
+ 722: 4763+11+6 05D7 D48D06 CNC CPUER ;TEST "RRC" FOR SET CARRY
+ 723: 4774+4 05DA 0F RRC
+ 724: 4778+7 05DB FE42 CPI 042H
+ 725: 4785+11+6 05DD C48D06 CNZ CPUER ;TEST "RRC" FOR ROTATION
+ 726: 4796+4 05E0 17 RAL
+ 727: 4800+4 05E1 17 RAL
+ 728: 4804+11+6 05E2 D48D06 CNC CPUER ;TEST "RAL" FOR SET CARRY
+ 729: 4815+7 05E5 FE08 CPI 008H
+ 730: 4822+11+6 05E7 C48D06 CNZ CPUER ;TEST "RAL" FOR ROTATION
+ 731: 4833+4 05EA 1F RAR
+ 732: 4837+4 05EB 1F RAR
+ 733: 4841+11+6 05EC DC8D06 CC CPUER ;TEST "RAR" FOR RE-SET CARRY
+ 734: 4852+7 05EF FE02 CPI 002H
+ 735: 4859+11+6 05F1 C48D06 CNZ CPUER ;TEST "RAR" FOR ROTATION
+ 736: 4870+10 05F4 013412 LXI B,01234H
+ 737: 4880+10 05F7 11AAAA LXI D,0AAAAH
+ 738: 4890+10 05FA 215555 LXI H,05555H
+ 739: 4900+4 05FD AF XRA A
+ 740: 4904+11 05FE C5 PUSH B
+ 741: 4915+11 05FF D5 PUSH D
+ 742: 4926+11 0600 E5 PUSH H
+ 743: 4937+11 0601 F5 PUSH PSW
+ 744: 4948+10 0602 010000 LXI B,00000H
+ 745: 4958+10 0605 110000 LXI D,00000H
+ 746: 4968+10 0608 210000 LXI H,00000H
+ 747: 4978+7 060B 3EC0 MVI A,0C0H
+ 748: 4985+7 060D C6F0 ADI 0F0H
+ 749: 4992+10 060F F1 POP PSW
+ 750: 5002+10 0610 E1 POP H
+ 751: 5012+10 0611 D1 POP D
+ 752: 5022+10 0612 C1 POP B
+ 753: 5032+11+6 0613 DC8D06 CC CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ 754: 5043+11+6 0616 C48D06 CNZ CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ 755: 5054+11+6 0619 E48D06 CPO CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ 756: 5065+11+6 061C FC8D06 CM CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ 757: 5076+7 061F 3E12 MVI A,012H
+ 758: 5083+4 0621 B8 CMP B
+ 759: 5087+11+6 0622 C48D06 CNZ CPUER ;TEST "PUSH B" AND "POP B"
+ 760: 5098+7 0625 3E34 MVI A,034H
+ 761: 5105+4 0627 B9 CMP C
+ 762: 5109+11+6 0628 C48D06 CNZ CPUER ;TEST "PUSH B" AND "POP B"
+ 763: 5120+7 062B 3EAA MVI A,0AAH
+ 764: 5127+4 062D BA CMP D
+ 765: 5131+11+6 062E C48D06 CNZ CPUER ;TEST "PUSH D" AND "POP D"
+ 766: 5142+4 0631 BB CMP E
+ 767: 5146+11+6 0632 C48D06 CNZ CPUER ;TEST "PUSH D" AND "POP D"
+ 768: 5157+7 0635 3E55 MVI A,055H
+ 769: 5164+4 0637 BC CMP H
+ 770: 5168+11+6 0638 C48D06 CNZ CPUER ;TEST "PUSH H" AND "POP H"
+ 771: 5179+4 063B BD CMP L
+ 772: 5183+11+6 063C C48D06 CNZ CPUER ;TEST "PUSH H" AND "POP H"
+ 773: 5194+10 063F 210000 LXI H,00000H
+ 774: 5204+10 0642 39 DAD SP
+ 775: 5214+16 0643 2207FF SHLD SAVSTK ;SAVE THE "OLD" STACK-POINTER!
+ 776: 5230+10 0646 3106FF LXI SP,TEMP4
+ 777: 5240+5 0649 3B DCX SP
+ 778: 5245+5 064A 3B DCX SP
+ 779: 5250+5 064B 33 INX SP
+ 780: 5255+5 064C 3B DCX SP
+ 781: 5260+7 064D 3E55 MVI A,055H
+ 782: 5267+13 064F 3204FF STA TEMP2
+ 783: 5280+4 0652 2F CMA
+ 784: 5284+13 0653 3205FF STA TEMP3
+ 785: 5297+10 0656 C1 POP B
+ 786: 5307+4 0657 B8 CMP B
+ 787: 5311+11+6 0658 C48D06 CNZ CPUER ;TEST "LXI","DAD","INX",AND "DCX" SP
+ 788: 5322+4 065B 2F CMA
+ 789: 5326+4 065C B9 CMP C
+ 790: 5330+11+6 065D C48D06 CNZ CPUER ;TEST "LXI","DAD","INX", AND "DCX" SP
+ 791: 5341+10 0660 2106FF LXI H,TEMP4
+ 792: 5351+5 0663 F9 SPHL
+ 793: 5356+10 0664 213377 LXI H,07733H
+ 794: 5366+5 0667 3B DCX SP
+ 795: 5371+5 0668 3B DCX SP
+ 796: 5376+18 0669 E3 XTHL
+ 797: 5394+13 066A 3A05FF LDA TEMP3
+ 798: 5407+7 066D FE77 CPI 077H
+ 799: 5414+11+6 066F C48D06 CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ 800: 5425+13 0672 3A04FF LDA TEMP2
+ 801: 5438+7 0675 FE33 CPI 033H
+ 802: 5445+11+6 0677 C48D06 CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ 803: 5456+7 067A 3E55 MVI A,055H
+ 804: 5463+4 067C BD CMP L
+ 805: 5467+11+6 067D C48D06 CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ 806: 5478+4 0680 2F CMA
+ 807: 5482+4 0681 BC CMP H
+ 808: 5486+11+6 0682 C48D06 CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ 809: 5497+16 0685 2A07FF LHLD SAVSTK ;RESTORE THE "OLD" STACK-POINTER
+ 810: 5513+5 0688 F9 SPHL
+ 811: 5518+10 0689 219F06 LXI H,CPUOK
+ 812: 5528+5 068C E9 PCHL ;TEST "PCHL"
+ 813: ;
+ 814: ;
+ 815: ;
+ 816: 5533+10 068D 218C01 CPUER: LXI H,NGCPU ;OUTPUT "CPU HAS FAILED ERROR EXIT=" TO CONSOLE
+ 817: 5543+17 0690 CD4601 CALL MSG
+ 818: 5560+18 0693 E3 XTHL
+ 819: 5578+5 0694 7C MOV A,H
+ 820: 5583+17 0695 CD5501 CALL BYTEO ;SHOW ERROR EXIT ADDRESS HIGH BYTE
+ 821: 5600+5 0698 7D MOV A,L
+ 822: 5605+17 0699 CD5501 CALL BYTEO ;SHOW ERROR EXIT ADDRESS LOW BYTE
+ 823: 5622+10 069C C30000 JMP WBOOT ;EXIT TO CP/M WARM BOOT
+ 824: ;
+ 825: ;
+ 826: ;
+ 827: 5632+10 069F 217501 CPUOK: LXI H,OKCPU ;OUTPUT "CPU IS OPERATIONAL" TO CONSOLE
+ 828: 5642+17 06A2 CD4601 CALL MSG
+ 829: 5659+10 06A5 C30000 JMP WBOOT ;EXIT TO CP/M WARM BOOT
+ 830: ;
+ 831: ; -------- RAM is implemented in top 256 bytes of the address space -------
+ 832: - FF00 ORG 0FF00H
+ 833: ;
+ 834: - FF00 02FF TEMPP: DW TEMP0 ;POINTER USED TO TEST "LHLD","SHLD",
+ 835: ; AND "LDAX" INSTRUCTIONS
+ 836: ;
+ 837: - FF02 TEMP0: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ 838: - FF03 TEMP1: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ 839: - FF04 TEMP2 DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ 840: - FF05 TEMP3: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ 841: - FF06 TEMP4: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+ 842: - FF07 SAVSTK: DS 2 ;TEMPORARY STACK-POINTER STORAGE LOCATION
+ 843: ;
+ 844: ;
+ 845: ;
+ 846: - FF80 STACK EQU TEMPP+128 ;DE-BUG STACK POINTER STORAGE AREA
+ 847: ;
+ 848: ;
+ 849: ;
+ 850: - FF09 END
+
+
+
+Statistics:
+
+ 4 passes
+ 0 jr promotions
+ 62 symbols
+ 1498 bytes
+
+
+
+Symbol Table:
+
+acii 249
+aimm 22e
+anii 26d
+bdos = 5
+byteo 155
+byto1 165
+byto2 169
+byto3 172
+c010 28b
+c020 2a1
+c030 2b7
+c_write 14
+c_writestr 1a
+cci 300
+cmi 2dc
+cnci 2f4
+cnzi 30c
+cpei 2d0
+cpie 246
+cpoi 2c4
+cpu 1af
+cpuer 68d
+cpuok 69f
+czi 318
+done 26
+init 28
+j010 1ba
+j020 1c0
+j030 1c6
+j040 1cc
+j050 1db
+j060 1de
+j070 1e6
+j080 1ef
+j090 1f2
+j100 1fa
+j110 203
+j120 206
+j130 20e
+j140 217
+j150 21a
+j160 222
+j170 22b
+movi 321
+msg 146
+ngcpu 18c
+okcpu 175
+orii 277
+pchar 14f
+savstk ff07
+sbii 261
+stack =ff80
+suii 255
+tcpi 2e8
+temp0 ff02
+temp1 ff03
+temp2 ff04
+temp3 ff05
+temp4 ff06
+tempp ff00
+wboot = 0
+xrii 281
+
\ No newline at end of file
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.lst
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.tap
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.tap
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.tap (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.tap (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/cpudiag.tap
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.ams
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.ams
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.ams (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.ams (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.ams
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.bds
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.bds (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.bds (revision 3)
@@ -0,0 +1,33 @@
+binary-debuggable-source
+0000 0000 f test.asm
+0000 0000 s switch_lsb .equ 0x0 ;port 0 when reading
+0000 0000 s switch_msb .equ 0x1 ;port 1 when reading
+0000 0000 s leds_lsb .equ 0x0 ;port 0 when writing
+0000 0000 s leds_msb .equ 0x1 ;port 1 when writing
+0000 0000 s
+0000 0000 s .org 0x0
+0000 0000 d f3
+0000 0000 s di
+0001 0001 d db00
+0001 0001 s loop: in switch_lsb
+0003 0003 d 3c
+0003 0003 s inr a
+0004 0004 d d300
+0004 0004 s out leds_lsb
+0006 0006 d db01
+0006 0006 s in switch_msb
+0008 0008 d af
+0008 0008 s xra a
+0009 0009 d d301
+0009 0009 s out leds_msb
+000b 000b d ca0100
+000b 000b s jz loop
+000e 000e d 76
+000e 000e s hlt
+000f 000f s
+000f 000f s
+0001 a loop
+0000 v leds_lsb
+0001 v leds_msb
+0000 v switch_lsb
+0001 v switch_msb
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.bds
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cim
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cim
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cim (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cim (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cim
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cmd
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cmd (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.cmd
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.hex
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.hex (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.hex (revision 3)
@@ -0,0 +1,2 @@
+:0F000000F3DB003CD300DB01AFD301CA01007674
+:0000000000
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.hex
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lcas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lcas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lcas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lcas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lcas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lst
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lst (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lst (revision 3)
@@ -0,0 +1,37 @@
+ 1: - 0000 switch_lsb .equ 0x0 ;port 0 when reading
+ 2: - 0001 switch_msb .equ 0x1 ;port 1 when reading
+ 3: - 0000 leds_lsb .equ 0x0 ;port 0 when writing
+ 4: - 0001 leds_msb .equ 0x1 ;port 1 when writing
+ 5:
+ 6: - 0000 .org 0x0
+ 7: 0+4 0000 F3 di
+ 8: 4+10 0001 DB00 loop: in switch_lsb
+ 9: 14+5 0003 3C inr a
+ 10: 19+10 0004 D300 out leds_lsb
+ 11: 29+10 0006 DB01 in switch_msb
+ 12: 39+4 0008 AF xra a
+ 13: 43+10 0009 D301 out leds_msb
+ 14: 53+10 000B CA0100 jz loop
+ 15: 63+7 000E 76 hlt
+ 16:
+ 17:
+
+
+
+Statistics:
+
+ 4 passes
+ 0 jr promotions
+ 5 symbols
+ 15 bytes
+
+
+
+Symbol Table:
+
+leds_lsb = 0
+leds_msb = 1
+loop 1
+switch_lsb = 0
+switch_msb = 1
+
\ No newline at end of file
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.lst
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.tap
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.tap
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.tap (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.tap (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test.tap
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.ams
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.ams
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.ams (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.ams (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.ams
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.bds
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.bds (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.bds (revision 3)
@@ -0,0 +1,53 @@
+binary-debuggable-source
+0000 0000 f test2.asm
+0000 0000 s switch_lsb .equ 0x0 ;port 0 when reading
+0000 0000 s switch_msb .equ 0x1 ;port 1 when reading
+0000 0000 s leds_lsb .equ 0x0 ;port 0 when writing
+0000 0000 s leds_msb .equ 0x1 ;port 1 when writing
+0000 0000 s
+0000 0000 s .org 0x0
+0000 0000 d f3
+0000 0000 s di
+0001 0001 d 11eedd
+0001 0001 s loop: lxi d, 0xddee
+0004 0004 d 01ccbb
+0004 0004 s lxi b, 0xbbcc
+0007 0007 d 21ffff
+0007 0007 s lxi h, 0xffff
+000a 000a d f9
+000a 000a s sphl
+000b 000b d 79
+000b 000b s mov a, c
+000c 000c d d300
+000c 000c s out leds_lsb
+000e 000e d 78
+000e 000e s mov a, b
+000f 000f d d301
+000f 000f s out leds_msb
+0011 0011 d 7b
+0011 0011 s mov a, e
+0012 0012 d d300
+0012 0012 s out leds_lsb
+0014 0014 d 7a
+0014 0014 s mov a, d
+0015 0015 d d301
+0015 0015 s out leds_msb
+0017 0017 d 7d
+0017 0017 s mov a, l
+0018 0018 d d300
+0018 0018 s out leds_lsb
+001a 001a d 7c
+001a 001a s mov a, h
+001b 001b d d301
+001b 001b s out leds_msb
+001d 001d d c20100
+001d 001d s jnz loop; dead loop because a is !0
+0020 0020 d 76
+0020 0020 s hlt
+0021 0021 s
+0021 0021 s
+0001 a loop
+0000 v leds_lsb
+0001 v leds_msb
+0000 v switch_lsb
+0001 v switch_msb
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.bds
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cim
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cim
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cim (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cim (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cim
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cmd
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cmd (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.cmd
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.hex
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.hex (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.hex (revision 3)
@@ -0,0 +1,4 @@
+:10000000F311EEDD01CCBB21FFFFF979D30078D3EA
+:10001000017BD3007AD3017DD3007CD301C20100E0
+:010020007669
+:0000000000
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.hex
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lcas
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lcas
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lcas (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lcas (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lcas
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lst
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lst (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lst (revision 3)
@@ -0,0 +1,47 @@
+ 1: - 0000 switch_lsb .equ 0x0 ;port 0 when reading
+ 2: - 0001 switch_msb .equ 0x1 ;port 1 when reading
+ 3: - 0000 leds_lsb .equ 0x0 ;port 0 when writing
+ 4: - 0001 leds_msb .equ 0x1 ;port 1 when writing
+ 5:
+ 6: - 0000 .org 0x0
+ 7: 0+4 0000 F3 di
+ 8: 4+10 0001 11EEDD loop: lxi d, 0xddee
+ 9: 14+10 0004 01CCBB lxi b, 0xbbcc
+ 10: 24+10 0007 21FFFF lxi h, 0xffff
+ 11: 34+6 000A F9 sphl
+ 12: 40+4 000B 79 mov a, c
+ 13: 44+11 000C D300 out leds_lsb
+ 14: 55+4 000E 78 mov a, b
+ 15: 59+11 000F D301 out leds_msb
+ 16: 70+4 0011 7B mov a, e
+ 17: 74+11 0012 D300 out leds_lsb
+ 18: 85+4 0014 7A mov a, d
+ 19: 89+11 0015 D301 out leds_msb
+ 20: 100+4 0017 7D mov a, l
+ 21: 104+11 0018 D300 out leds_lsb
+ 22: 115+4 001A 7C mov a, h
+ 23: 119+11 001B D301 out leds_msb
+ 24: 130+10 001D C20100 jnz loop; dead loop because a is !0
+ 25: 140+4 0020 76 hlt
+ 26:
+ 27:
+
+
+
+Statistics:
+
+ 4 passes
+ 0 jr promotions
+ 5 symbols
+ 33 bytes
+
+
+
+Symbol Table:
+
+leds_lsb = 0
+leds_msb = 1
+loop 1
+switch_lsb = 0
+switch_msb = 1
+
\ No newline at end of file
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.lst
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.tap
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.tap
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.tap (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.tap (revision 3)
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zout/test2.tap
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/ALTMON.ASM
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/ALTMON.ASM (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/ALTMON.ASM (revision 3)
@@ -0,0 +1,900 @@
+;-------------------------------------------------------------------------
+; ALTMON.ASM - 1K ROM monitor for the Altair 8800.
+;
+; This monitor is based on the 2.0C monitor from Vector Graphic. The
+; original version has been updated to use Altair 2SIO serial ports
+; for I/O and several commands have been added and/or modified.
+;
+; A typical location for this PROM in an Altair is at F800, though
+; it can be assembled at most any address. The stack is typically
+; placed at the top of the minimum RAM you expect to have in your
+; system.
+;
+; Version Date Author
+; ------- ---------- ---------------------------------------
+; 1.0 01/10/2016 Mike Douglas (Original)
+;
+; 1.1 02/29/2016 Mike Douglas
+; Fix bug in DUMP code that caused improper range of bytes
+; to display. Also in DUMP, display '.' for all characters
+; 7Fh or above.
+;
+; Initialize 2nd 2SIO port so that loading of Intel HEX
+; files works over the 2nd port. Only flush hex file
+; input on the console serial port to free up code space
+; and because it's not really required for the 2nd port.
+;
+;-------------------------------------------------------------------------
+;
+; Following is a summary of changes from the original VG 2.0c monitor:
+;
+; All commands immediately echo a full command name as soon as the
+; first command letter is typed (e.g., typing "M" immediately
+; displays "MOVE"). This makes it easier to identify commands
+; without a list of commands present.
+;
+; The ESC key can be pressed to abort input or commands as in
+; the later 4.x monitors from VG. The original ctrl-c abort is
+; still present as well.
+;
+; The B (boot) command jumps to the Altair disk boot loader PROM
+; at FF00 instead of the North Star boot ROM.
+;
+; A (ASCII dump) command removed and D (hex dump) updated to display
+; both hex and ASCII.
+;
+; X (exchange) command changed to the E command.
+;
+; H command added to load Intel hex file via either serial port
+; on a 2SIO. The L (load and go from tape) does a hex file load
+; as well (all tape commands eliminated).
+;
+; J treated as jump (i.e., go to) command instead of jump to North
+; Star DOS.
+;
+; K treated as fill memory with "K"onstant instead of jump to zero
+; (was the Z command which has been removed).
+;
+; R command sizes RAM (i.e., runs the N non-destructive memory test)
+; Was previously a read from cassette command. All cassette commands
+; have been removed.
+;
+; The Y command (Vector Graphic relocating loader) command has been
+; removed.
+;
+; The T test memory command skips the 256 byte page the stack is on
+; to prevent crashing the program. A "." pacifier is displayed
+; after each cycle through the memory test range is completed
+;
+;-------------------------------------------------------------------------
+;
+; Command Summary:
+;
+; B jump to Altair disk boot loader (FF00)
+; C SSSS FFFF CCCC compare blocks
+; D SSSS FFFF dump in hex and ASCII
+; E SSSS FFFF DDDD exchange block
+; F SSSS FFFF DD DD find two byte sequence
+; G SSSS go to and execute
+; H P load Intel hex file from 2SIO port 0 or 1
+; I PP input from I/O port
+; J SSSS go to and execute (G)
+; K SSSS FFFF DD fill with "K"onstant
+; L P load Intel hex file from 2SIO port 0 or 1
+; M SSSS FFFF DDDD move block
+; N non destructive memory test (size RAM)
+; O PP DD output to port
+; P LLLL program memory
+; Q SSSS FFFF compute checksum
+; R non destructive memory test (size RAM)
+; S SSSS FFFF DD search for single byte sequence
+; T SSSS FFFF test memory
+;
+;-------------------------------------------------------------------------
+;
+; Memory location equates
+
+ org 00400h ;ROM location
+
+SPTR equ 0ffffh ;stack pointer (use 256 byte boundary)
+SIOPORT equ SPTR-32 ;2SIO port used for hex load
+BOOT equ 0ff00h ;Altair disk boot loader ROM
+
+; 88-2SIO equates
+
+CONS equ 10h ;console status port
+COND equ 11h ;console data port
+TBE equ 2 ;transmit buffer entry
+RDA equ 1 ;receive data available
+
+; Misc Equates
+
+CR equ 13 ;ASCII carriage return
+LF equ 10 ;ASCII line feed
+CTRLC equ 3 ;ASCII control-c
+ESC equ 27 ;ASCII ESCAPE
+
+;---------------------------------------------------------
+; monit - monitor entry point
+;---------------------------------------------------------
+monit mvi a,3 ;reset 6850 uart
+ out CONS
+ out CONS+2 ;2nd 2SIO port as well
+ mvi a,11h ;8N2
+ out CONS
+ out CONS+2 ;2nd 2SIO port as well
+
+ lxi sp,SPTR
+ call dspMsg ;display welcome banner
+ db CR,LF,LF,'ALTMON 1.','1'+80h
+
+; start - command processing loop
+
+start lxi sp,SPTR ;re-init stack pointer
+ lxi h,start ;RET's go back to start
+ push h
+
+ call crlf ;display '*' prompt after CR/LF
+ mvi a,'*'
+ call ptcn
+
+ call getCon ;read command from keyboard
+ ani 05FH ;lower case to upper case
+ cpi 'B'
+ rc ;too small
+ cpi 'U'
+ rnc ;too large
+
+ lxi h,cmdTbl+100h-2*'B' ;'B' indexes to start of cmdtbl
+ add a ;2 bytes per entry
+ add l
+ mov l,a
+
+ mov e,m ;e=lsb of jump address
+ inx h
+ mov d,m ;d=high byte of jump address
+ xchg
+ pchl ;away we go
+
+; Command Table
+
+cmdTbl dw doboot ;B jump to Altair disk boot loader
+ dw compr ;C SSSS FFFF CCCC compare blocks
+ dw disp ;D SSSS FFFF dump in hex
+ dw exchg ;E SSSS FFFF DDDD exchange block
+ dw srch2 ;F SSSS FFFF DD DD two byte search
+ dw exec ;G SSSS go to and execute
+ dw hexLoad ;H P load Intel hex file from port
+ dw pinpt ;I PP input from I/O port
+ dw exec ;J SSSS jump to and execute (G)
+ dw fill ;K SSSS FFFF DD fill RAM with "k"onstant
+ dw hexLoad ;L P load Intel hex file from port
+ dw moveb ;M SSSS FFFF DDDD move block
+ dw ndmt ;N non destructive memory test (RAM size)
+ dw poutp ;O PP DD output to port
+ dw pgm ;P LLLL program memory
+ dw chksum ;Q SSSS FFFF compute checksum
+ dw ndmt ;R non destructive memory test (RAM size)
+ dw srch1 ;S SSSS FFFF DD search for single byte
+ dw tmem ;T SSSS FFFF test memory
+
+;--------------------------------------------------------------------------
+; exec (G or J) - execute the program at the address
+;--------------------------------------------------------------------------
+exec call dspMsg
+ db 'GOT','O'+80h
+
+ call ahex ;read address from keyboard
+ xchg
+ pchl
+
+;--------------------------------------------------------------------------
+; doBoot (B) - boot floppy disk by jumping to DBL PROM at FF00
+;--------------------------------------------------------------------------
+doBoot call dspMsg
+ db 'BOO','T'+80h
+
+ jmp BOOT
+
+;--------------------------------------------------------------------------
+; chksum (Q) - compute checksum
+;--------------------------------------------------------------------------
+chksum call dspMsg
+ db 'CSU','M'+80h
+
+ call tahex
+ mvi b,0 ;start checksum = 0
+
+csloop mov a,m ;get data from memory
+ add b ;add to checksum
+ mov b,a
+ call bmp
+ jnz csloop ;repeat loop
+
+ mov a,b ;a=checksum
+ jmp pt2 ;print checksum and exit
+
+;--------------------------------------------------------------------------
+; tmem (T) - memory test routine
+;--------------------------------------------------------------------------
+tmem call dspMsg
+ db 'TES','T'+80h
+
+ call tahex ;read addresses
+ lxi b,05a5ah ;init b,c
+
+cycl mvi a,'.' ;display '.' before each cycle
+ call ptcn
+ call rndm
+ push b ;keep all registers
+ push h
+ push d
+
+tlop mov a,h ;on stack page?
+ cpi (SPTR shr 8)-1 ;compare to msb of stack
+ jz skipWr ;in stack, skip write
+ call rndm
+ mov m,b ;write in memory
+skipWr call bmp
+ jnz tlop ;repeat loop
+
+ pop d
+ pop h ;restore original
+ pop b ;values
+ push h
+ push d
+
+rlop mov a,h ;on stack page?
+ cpi (SPTR shr 8)-1 ;compare to msb of stack
+ jz skipRd ;in stack, skip the read
+ call rndm ;generate new sequence
+ mov a,m ;read memory
+ cmp b ;compare memory
+ cnz err ;call error routine
+skipRd call bmp
+ jnz rlop
+
+ pop d
+ pop h
+ call pause
+ jmp cycl
+
+; rndm - this routine generates random numbers
+
+rndm mov a,b ;look at b
+ ani 0b4h ;mask bits
+ ana a ;clear carry
+ jpe peve ;jump if even
+ stc
+peve mov a,c ;look at c
+ ral ;rotate carry in
+ mov c,a ;restore c
+ mov a,b ;look at b
+ ral ;rotate carry in
+ mov b,a ;restore b
+ ret ;return with new b,c
+
+;--------------------------------------------------------------------------
+; disp (D) - display memory contents
+;--------------------------------------------------------------------------
+disp call dspMsg
+ db 'DUM','P'+80h
+
+ call tahex ;read addresses
+
+dmpLine push h ;save address at start of line
+ mvi c,16 ;16 locations per line
+ call ptad ;print current address
+
+; dump line in hex
+
+dmpHex mov a,m ;a=byte to display
+ call pt2 ;display it
+ call spce
+ inx h
+ dcr c ;decrement line byte count
+ jnz dmpHex ;loop until 16 bytes done
+
+; dump line in ASCII
+
+ call spce
+ pop h ;hl->start of line
+ mvi c,16 ;16 locations per line
+
+dmpAsc mov a,m ;a=byte to display
+ cpi 7Fh ;test if >= 7Fh
+ jnc dspDot ;non printable, show '.'
+
+ cpi ' ' ;displayable character?
+ jnc dspAsc ;yes, go display it
+
+dspDot mvi a,'.' ;display '.' instead
+
+dspAsc call ptcn ;display the character
+ call bmp ;increment hl, possibly de
+ dcr c ;decrement line byte count
+ jnz dmpAsc ;loop until 16 bytes done
+
+ call bmp ;done?
+ rz ;yes
+ dcx h ;undo extra bump of hl
+ jmp dmpLine ;do another line
+
+;--------------------------------------------------------------------------
+; pgm (P) - program memory
+;--------------------------------------------------------------------------
+pgm call dspMsg
+ db 'PG','M'+80h
+
+ call ahex ;read address
+ xchg
+ call crlf
+
+pglp mov a,m ;read memory
+ call pt2 ;print 2 digits
+ mvi a,'-' ;load dash
+ call ptcn ;print dash
+
+crig call rdcn ;get user input
+ cpi ' ' ;space
+ jz con2 ;skip if space
+ cpi CR ;skip if CR
+ jnz con1
+ call crlf ;print CR,LF
+ jmp crig ;back for more
+
+con1 xchg ;HL->DE
+ lxi h,0 ;get 16 bit zero
+ mvi c,2 ;count 2 digits
+ call ahexNr ;convert to hex (no read)
+ mov m,e
+con2 inx h
+ jmp pglp
+
+;--------------------------------------------------------------------------
+; fill (K) - fill memory with a constant
+;--------------------------------------------------------------------------
+fill call dspMsg
+ db 'FIL','L'+80h
+
+ call tahex ;read addresses
+ push h ;start addr on stack
+ mvi c,2 ;reading 2 digits
+ call ahe0 ;input fill byte
+ xchg ;byte to write from e to l
+ xthl ;hl=start addr, stack=fill byte
+ pop b ;c=fill byte from stack
+
+zloop mov m,c ;write into memory
+ call bmp ;compare address, increment h
+ rz
+ jmp zloop
+
+;--------------------------------------------------------------------------
+; moveb (M) - move a block of memory
+; exchg (E) - exhange block of memory
+;--------------------------------------------------------------------------
+moveb call dspMsg
+ db 'MOV','E'+80h
+ xra a ;a=0 means "move" command
+ jmp doMove
+
+exchg call dspMsg
+ db 'EXC','H'+80h
+ ;a returned <> 0 means "exchange" command
+
+doMove mov b,a ;save move/exchange flag in b
+ call tahex ;read addresses
+ push h
+ call ahex
+ xchg
+ xthl ;HL->start, DE->end, stack has dest
+
+mloop mov c,m ;c=byte from source
+ xthl ;hl->destination
+
+ mov a,b ;move or exchange?
+ ora a
+ jz nexch ;0 means move only
+
+ mov a,m ;a=from destination
+ xthl ;hl->source
+ mov m,a ;move destination to source
+ xthl ;hl->destination
+
+nexch mov m,c ;move source to destination
+ inx h ;increment destination
+ xthl ;hl->source
+ call bmp ;increment source and compare to end
+ jnz mloop
+
+ pop h ;remove temp pointer from stack
+ ret ;and exit
+
+;--------------------------------------------------------------------------
+; ndmt (N or R) - non destructive memory test (size RAM)
+;--------------------------------------------------------------------------
+ndmt call dspMsg
+ db 'RAMTO','P'+80h
+
+ lxi h,0ffffh ;start at zero
+
+ndlop inx h
+ mov a,m ;read from address in hl
+ mov b,a ;save original value in b
+ cma ;form and write inverted value
+ mov m,a
+ cmp m ;read and compare
+ mov m,b ;restore original value
+ jz ndlop ;keep going if still RAM
+
+ jmp err ;display end of RAM
+
+;--------------------------------------------------------------------------
+; compr (C) - compare two blocks of memory
+;--------------------------------------------------------------------------
+compr call dspMsg
+ db 'COM','P'+80h
+
+ call tahex ;read addresses
+ push h ;source start on stack
+ call ahex
+ xchg ;de=source end, hl=compare start
+
+vmlop mov a,m ;a=compare byte
+ inx h
+ xthl ;hl->source byte
+ cmp m ;same?
+ mov b,m ;b=source byte
+ cnz err ;display the error
+ call bmp ;increment pointers
+ xthl ;hl->compare byte
+ jnz vmlop
+
+ pop h ;remove temp pointer from stack
+ ret ;and exit
+
+;--------------------------------------------------------------------------
+; srch1 (S) - search for one byte
+; srch2 (F) - search for two bytes
+;--------------------------------------------------------------------------
+srch1 call dspMsg
+ db 'FIND','1'+80h
+ xra a ;zero flag means one byte search
+ jmp doSrch
+
+srch2 call dspMsg
+ db 'FIND','2'+80h
+ ;a returned <> 0 means two byte search
+
+doSrch push psw ;save 1/2 byte flag on stack
+ call tahex
+
+ push h ;save h, getting 1st byte to find
+ mvi c,2 ;reading 2 hex digits
+ call ahe0 ;
+ xchg ;h=code, d=f
+ mov b,l ;put code in b
+ pop h ;restore h
+
+ pop psw ;a=one/two byte flag
+ ora a ;zero true if one byte search
+ push psw
+ jz cont
+
+ push h ;save h, getting 2nd byte to find
+ mvi c,2
+ call ahe0
+ xchg
+ mov c,l
+ pop h
+
+cont mov a,m ;read memory
+ cmp b ;compare to code
+ jnz skp ;skip if no compare
+
+ pop psw ;a=one/two byte flag
+ ora a ;zero true if one byte serach
+ push psw
+ jz obcp
+
+ inx h ;two byte search
+ mov a,m
+ dcx h
+ cmp c
+ jnz skp
+
+obcp inx h
+ mov a,m ;read next byte
+ dcx h ;decr address
+ call err ;print data found
+
+skp call bmp ;check if done
+ jnz cont ;back for more
+ pop psw ;remove flag saved on stack
+ ret
+
+;--------------------------------------------------------------------------
+; poutp (O) - output data to a port
+;--------------------------------------------------------------------------
+poutp call dspMsg
+ db 'OU','T'+80h
+
+ mvi c,2
+ call ahe0 ;port number in e
+
+ mvi c,2
+ call ahe0 ;port to l, data in e
+
+ mov d,l ;d=port
+ lxi h,SPTR-30h ;form OUT nn, RET in memory at h
+ mvi m,0c9h ;RET opcode
+ dcx h
+ mov m,d ;output port for OUT instruction
+ dcx h
+ mvi m,0D3H ;OUT opcode
+ mov a,e
+ pchl ;call OUT, RET
+
+;--------------------------------------------------------------------------
+; pinpt (I) - input data from a port
+;--------------------------------------------------------------------------
+pinpt call dspMsg
+ db 'I','N'+80h
+
+ mvi c,2
+ call ahe0 ;port number to e
+
+ lxi h,SPTR-30H ;form IN nn, RET in memory at h
+ mvi m,0C9H ;RET opcode
+ dcx h
+ mov m,e ;input port of IN instruction
+ dcx h
+ mvi m,0DBH ;IN opcode
+ call SPTR-32H
+ jmp pt2
+
+;---------------------------------------------------------------------
+; hexLoad (H or L) - load intel hex through 2SIO serial port 0 or 1
+;---------------------------------------------------------------------
+hexload call dspMsg
+ db 'HEXLOA','D'+80h
+
+ mvi c,1 ;read one hex digit
+ call ahe0 ;digit is in e
+ lxi h,SIOPORT ;hl->location on stack to save port
+ mov m,e ;SIOPORT = 0 or 1
+
+; rcvLine - receive a hex file line
+
+rcvLine call crlf
+ mvi c,0 ;clear echo character flag
+
+wtMark call getChar ;read next character
+ sui ':' ;record marker?
+ jnz wtMark ;no, keep looking
+
+; Have start of new record. Save the byte count and load address.
+; The load address is echoed to the screen so the user can
+; see the file load progress.
+
+ mov d,a ;init checksum in D to zero
+
+ call iByte ;input two hex digits (byte count)
+ mov a,e ;test for zero byte count
+ ora a
+ jz flush ;count of 0 means end
+
+ mov b,e ;B = byte count on line
+
+ inr c ;set echo flag for address bytes
+ call iByte ;get MSB of address
+ mov h,e ;H = address MSB
+ call iByte ;get LSB of address
+ mov l,e ;L = address LSB
+ dcr c ;clear echo flag
+
+ call iByte ;ignore/discard record type
+
+; Receive the data bytes of the record and move to memory
+
+data call iByte ;read a data byte (2 hex digits)
+ mov m,e ;store in memory
+ inx h
+ dcr b
+ jnz data
+
+; Validate checksum
+
+ call iByte ;read and add checksum
+ jz rcvLine ;checksum good, receive next line
+
+ call dspMsg ;display error message
+ db ' ER','R'+80h
+ ;fall into flush
+
+; flush - flush rest of file as it comes in until no characters
+; received for about 1/4 second to prevent incoming file
+; data looking like typed monitor commands. Only the console
+; port needs to be flushed.
+
+flush in COND ;clear possible received char
+ lxi d,10417 ;.25s timeout for 48 cycle loop
+
+flshLp in CONS ;(10) look for character on console
+ rrc ;(4) data flag in carry
+ jc flush ;(10) data received, restart
+
+ dcx d ;(5) decrement timeout
+ mov a,d ;(5)
+ ora e ;(4)
+ jnz flshLp ;(10) loop until zero
+ ret ;done
+
+;-----------------------------------------------------------
+; iByte - read two ascii hex bytes and return binary
+; value in e.
+;-----------------------------------------------------------
+iByte call getChar ;get a character
+ call asc2Bin ;ascii hex digit to binary
+ add a ;put in msn, zero lsn
+ add a
+ add a
+ add a
+ mov e,a ;save byte with MSN in E
+
+; 2nd byte (LSN)
+
+ call getChar ;get a character
+ call asc2Bin ;ascii hex digit to binary
+ add e ;combine msn and lsn
+ mov e,a ;save in EH
+ add d ;add character to checksum
+ mov d,a
+ ret
+
+;-------------------------------------------------------------
+; asc2Bin - ASCII hex digit to binary conversion. Digit
+; passed in a, returned in a. Errors ignored as checksum
+; will eventually kick this out.
+;-------------------------------------------------------------
+asc2Bin sui '0' ;'0' to 0
+ cpi 10 ;0-9 ?
+ rc
+
+ sui 7 ;'A-F' to A-F
+ ret
+
+;-------------------------------------------------------------
+; getChar - read a character from the 2SIO port specified in
+; SIOPORT. The character is also echoed to the console port
+; if the echo flag (c) is set (non-zero)
+;-------------------------------------------------------------
+getChar push b ;save b,c
+ lda SIOPORT ;a=pseudo port to use
+ ora a ;port zero?
+ jnz inWait1 ;no, use port 1
+
+; in through 1st port (0) on 2SIO
+
+inWait0 call cntlc ;test for character from console
+ jz inWait0
+ jmp haveChr
+
+; in through 2nd port (1) on 2SIO, check for ctrl-c on console
+; while waiting
+
+inWait1 call cntlc ;look for ctrl-c on console
+ in CONS+2 ;wait for character on 2nd 2SIO
+ rrc ;data flag in carry
+ jnc inWait1
+ in COND+2 ;a=character read
+
+; process new character in a. Echo to console if c is non-zero
+
+haveChr mov b,a ;save character in b
+ mov a,c ;echo flag (c) set?
+ ora a
+ jz noEcho ;no echo
+
+ mov a,b ;a=character to send
+ pop b ;restore b,c
+ jmp ptcn ;display character and exit
+
+noEcho mov a,b ;a=byte read
+ pop b ;restore b,c
+ ret
+
+;********************************************************************
+;
+; Type conversion, input, output subroutines
+;
+;********************************************************************
+
+;------------------------------------------------------------
+; tahex - read two 16 bit addresses. 1st returned in HL, 2nd in DE
+;------------------------------------------------------------
+tahex call ahex ;get first address param
+ ;fall into ahex to get 2nd param
+
+;------------------------------------------------------------
+; ahex - read up to 4 hex digits to binary, return in de
+;------------------------------------------------------------
+ahex mvi c,4 ;count of 4 digits
+ahe0 lxi h,0 ;16 bit zero
+ahe1 call rdcn ;read a byte
+ahexNr cpi '0'
+ jc start ;below '0', abort
+ cpi ':'
+ cnc alph
+ dad h
+ dad h
+ dad h
+ dad h
+ sui '0' ;ascii bias
+ cpi 10 ;digit 0-10
+ jc alf
+ sui 7 ;alpha bias
+alf add l
+ mov l,a
+ dcr c
+ jnz ahe1 ;keep reading
+ xchg ;result in de
+ ;fall through to print a space
+;------------------------------------------------------------
+; spce - print a space
+; ptcn - print character passed in a
+;------------------------------------------------------------
+spce mvi a,' ' ;print space
+ptcn push psw
+
+ptlop in CONS ;wait for OK to transmit
+ ani TBE
+ jz ptlop
+
+ pop psw ;recover a
+ ani 07fh ;get rid of msbit
+ out COND ;and print it
+ ret ;return from ptcn
+
+;------------------------------------------------------------
+; alph - verify valid hex digit, abort to command loop if not
+;------------------------------------------------------------
+alph cpi 'A'
+ jc start
+ ani 05fh
+ cpi 'G'
+ jnc start
+ ret
+
+;------------------------------------------------------------
+; crlf - print CR/LF
+;------------------------------------------------------------
+crlf mvi a,CR
+ call ptcn
+ mvi a,LF
+ jmp ptcn
+
+;------------------------------------------------------------
+; err - display the address in hl followed by the value
+; in b, then the value in a.
+;------------------------------------------------------------
+err push psw ;save A
+ call ptad ;print address
+ mov a,b ;print B
+ call pt2
+ call spce
+ pop psw ;print A
+pt2 push psw
+ call binh
+ pop psw
+ jmp binl
+
+;------------------------------------------------------------
+; ptad - display the address in h
+;------------------------------------------------------------
+ptad call crlf ;print cr,lf
+ call pause
+ mov a,h ;print
+ call pt2 ;ascii
+ mov a,l ;codes
+ call pt2 ;for
+ call spce ;address
+ ret
+
+;------------------------------------------------------------
+; binh - print MSN of byte passed in A
+; binl - print LSN of byte passed in A
+;------------------------------------------------------------
+binh rar
+ rar
+ rar
+ rar
+binl ani 0fh ;low 4 bits
+ adi '0' ;ascii bias
+ cpi 03ah ;digit 0-9
+ jc ptcn
+ adi 7 ;digit A-F
+ jmp ptcn
+
+;------------------------------------------------------------
+; dspMsg - display in-line message. String terminated by byte
+; with msbit set.
+;------------------------------------------------------------
+dspMsg pop h ;hl->string to display
+
+dspLoop mov a,m ;a=next character to display
+ call ptcn ;display character
+ ora m ;MSB set? (last byte)
+ inx h ;point to next character
+ jp dspLoop ;no, keep looping
+
+ call spce ;display a trailing space
+ pchl ;return past the string
+
+;------------------------------------------------------------
+; rdcn - read from console to A with echo to screen
+; getCon - read from console to A without echo
+;------------------------------------------------------------
+rdcn call getCon ;get character from console
+ cpi ESC ;ESC confuses smart terminals
+ rz ; so don't echo escape
+ jmp ptcn ;echo onto printer
+
+getCon in CONS ;read keyboard status
+ rrc ;data available flag in carry
+ jnc getCon
+
+ in COND ;read from keyboard
+ ani 07fh ;strip off msb
+ ret
+
+;------------------------------------------------------------
+; pause - pause/resume with spacebar. Also look for a ctrl-c
+; or ESC to abort.
+;------------------------------------------------------------
+pause call cntlc ;look for abort or other character
+ cpi ' '
+ rnz ;return if not space or abort
+
+ploop call cntlc ;loop here until space or abort pressed
+ cpi ' '
+ jnz ploop
+ ret
+
+;------------------------------------------------------------
+; cntlc - see if a character has been typed. If not, return
+; zero true. If ctrl-c or ESC typed, abort and return to
+; the command loop. Otherwise, return the character typed.
+;------------------------------------------------------------
+cntlc in CONS ;anything typed?
+ ani RDA
+ rz ;no, exit with zero true
+
+ in COND ;get the typed character
+ ani 07fh
+ cpi CTRLC ;abort with ctrl-c (2.0 style)
+ jz start
+ cpi ESC ;or ESC (4.x style)
+ jz start
+ ret
+
+;------------------------------------------------------------
+; bmp - compare address and increment h. Return zero true
+; if hl=de. Once hl=de, then de is incremented each time
+; so the comparison remains true for subsequent calls.
+;------------------------------------------------------------
+bmp mov a,e ;compare lsb's of hl,de
+ sub l
+ jnz goon ;not equal
+
+ mov a,d ;compare msb's of hl,de
+ sbb h ;gives zero true if equal
+
+goon inx h ;increment hl
+ rnz ;exit if hl <> de yet
+
+ inx d ;increase de as well so it will
+ ret ; still be equal next time
+
+ end
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/ALTMON.ASM
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/boot.asm
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/boot.asm (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/boot.asm (revision 3)
@@ -0,0 +1,276 @@
+;--------------------------------------------------------------------------
+; Simple test program for Sys9080 project https://github.com/zpekic/sys9080
+; (c) zpekic@hotmail.com - 2017, 2018
+;--------------------------------------------------------------------------
+ACIA0_STATUS EQU 0x10; status read-only
+ACIA0_DATA EQU 0x11; data send/receive
+ACIA1_STATUS EQU 0x12; status read-only
+ACIA1_DATA EQU 0x13; data send/receive
+PORT_0 EQU 0x00;
+PORT_1 EQU 0x01;
+MASK_VALID EQU 0x01; fields in UART status register
+MASK_READY EQU 0x02;
+MASK_ERROR EQU 0x40;
+MASK_INTREQ EQU 0x80;
+CR EQU 0x0D; ASCII newline
+LF EQU 0x0A; ASCII line feed
+MASK_BUTTON1 EQU 0x02;
+Temp_PC EQU 0xFF00; can't use DW because the hex file maps to ROM only
+AltMon EQU 0x0400; Altmon is org'd to this location
+
+
+ ORG 0x0000 ;-----RST0 == RESET
+ DI
+ JMP Boot
+
+ ORG 0x0008 ;-----RST1 (not used)
+ DI
+ JMP DumpState
+
+ ORG 0x0010 ;-----RST2 (not used)
+ DI
+ JMP DumpState
+
+ ORG 0x0018 ;-----RST3 (not used)
+ DI
+ JMP DumpState
+
+ ORG 0x0020 ;-----RST4 (ACIA1)
+ DI
+ JMP OnByteReceived
+
+ ORG 0x0028 ;-----RST5 (ACIA0)
+ DI
+ JMP OnByteReceived
+
+ ORG 0x0030 ;-----RST6 (BTN1)
+ EI ;no interrupt servicing (used to control ACIA status)
+ RET
+
+ ORG 0x0038 ;-----RST7 (BTN0)
+ DI
+DumpState: XTHL ;PC from stack is now in HL
+ SHLD Temp_PC ;store away (making this code non re-entrant)
+ XTHL ;restore PC to stack
+ PUSH H
+ PUSH D
+ PUSH B
+ PUSH PSW
+
+ PUSH H
+ PUSH D
+ PUSH B
+ PUSH PSW
+
+ LXI H, TextAF
+ CALL TxStringAtHL
+ XTHL
+ CALL TxValueOfHL
+ POP H
+
+ LXI H, TextBC
+ CALL TxStringAtHL
+ XTHL
+ CALL TxValueOfHL
+ CALL BytesAtHL
+ POP H
+
+ LXI H, TextDE
+ CALL TxStringAtHL
+ XTHL
+ CALL TxValueOfHL
+ CALL BytesAtHL
+ POP H
+
+ LXI H, TextHL
+ CALL TxStringAtHL
+ XTHL
+ CALL TxValueOfHL
+ CALL BytesAtHL
+ POP H
+
+ LXI H, TextPC
+ CALL TxStringAtHL
+ LHLD Temp_PC
+ CALL TxValueOfHL
+ CALL BytesAtHL
+
+ LXI H, TextSP
+ CALL TxStringAtHL
+ LXI D, 0xFFFF ;start searching for stack position from top of memory down
+ LHLD Temp_PC
+ XCHG ;HL = 0xFFFF, DE = PC to search for
+SearchForPC: MOV A, D
+ CMP M
+ JNZ NotFound
+ DCX H
+ MOV A, E
+ CMP M
+ JNZ SearchForPC
+ CALL TxValueOfHL
+ CALL BytesAtHL
+ MVI A, CR
+ CALL SendChar
+ JMP RestoreRegs
+NotFound: DCX H
+ JMP SearchForPC
+
+RestoreRegs: POP PSW
+ POP B
+ POP D
+ POP H
+ EI
+ RET
+
+;-------------------------------------------
+OnByteReceived: PUSH PSW
+ IN PORT_1 ;hooked up to 4 push buttons
+ ANI MASK_BUTTON1
+ JZ ProcessByte
+ PUSH H
+ PUSH D
+ PUSH B
+
+ IN ACIA1_STATUS
+ MOV H, A
+ IN ACIA1_DATA
+ MOV L, A
+ PUSH H
+
+ IN ACIA0_STATUS
+ MOV H, A
+ IN ACIA0_DATA
+ MOV L, A
+ PUSH H
+
+ LXI H, TextACIA0
+ CALL TxStringAtHL
+ POP H
+ CALL TxValueOfHL
+
+ LXI H, TextACIA1
+ CALL TxStringAtHL
+ POP H
+ CALL TxValueOfHL
+
+ POP B
+ POP D
+ POP H
+ProcessByte: POP PSW
+ EI
+ RET
+;-------------------------------------------
+Boot: LXI H, 0000H
+ DCX H
+ SPHL
+ LXI H, TextGreet1
+ CALL TxStringAtHL
+ CALL GetLowestRam
+ MOV A, L
+ OUT PORT_0
+ MOV A, H
+ OUT PORT_1 ;display on LEDs
+ CALL TxValueOfHL ;display on console
+ LXI H, TextPort
+ CALL TxStringAtHL
+ IN PORT_0
+ MOV L, A
+ IN PORT_1
+ MOV H, A
+ CALL TxValueOfHL
+ LXI H, TextGreet2
+ CALL TxStringAtHL
+ CALL PrintAsciiSet
+ EI
+; HLT ;interrupt is needed to go further
+;-------------------------------------------------------------------------
+ JMP AltMon ;enter monitor program
+;-------------------------------------------------------------------------
+PrintAsciiSet: LXI B, 0D20H ;set C to ASCII space
+SendNextChar: MOV A, C
+ CALL SendChar ;send char
+ CPI "~" ;end of printable chars reached?
+ JZ NextLine
+ INR C
+ JMP SendNextChar
+NextLine: MOV A, B
+ CALL SendChar ;send char
+ XRI 00000110B ;cheap trick to convert newline to linefeed
+ CALL SendChar ;send char
+ RET
+
+TxStringAtHL: MOV A, M
+ ANA A
+ RZ
+ CALL SendChar
+ INX H
+ JP TxStringAtHL
+
+BytesAtHL: MVI C, 0x10 ;dump 16 bytes at (HL)
+NextByteAtHL: MVI A, " "
+ CALL SendChar
+ MOV A, M
+ CALL TxValueOfA
+ DCR C
+ RZ ;return if reached 0
+ INX H
+ JMP NextByteAtHL
+
+TxValueOfHL: MOV A, H
+ CALL TxValueOfA
+ MOV A, L
+TxValueOfA: PUSH PSW
+ RRC
+ RRC
+ RRC
+ RRC
+ ANI 0x0F
+ CALL TxHexDig
+ POP PSW
+ ANI 0x0F
+TxHexDig: ADI '0'
+ CPI '9' + 1
+ JM TxHexDigOut
+ ADI 0x07
+TxHexDigOut: CALL SendChar
+ RET
+
+SendChar: PUSH PSW
+CheckIfReady: IN ACIA0_STATUS
+ ANI MASK_READY
+ JZ CheckIfReady
+ POP PSW
+ OUT ACIA0_DATA
+ RET
+
+GetLowestRam: LXI H, 0xFFFF ;assume RAM is located near top of address space
+NextAddress: MOV A, M
+ CMP M
+ JNZ LowestFound
+ CMA ;flip all bits
+ MOV M, A
+ CMP M
+ JNZ LowestFound
+ CMA
+ MOV M, A
+ MOV A, H
+ ORA L
+ RZ ;Bail if HL = 0
+ DCX H
+ JMP NextAddress
+LowestFound: INX H
+ RET
+
+
+TextAF: DB CR, "AF = ", 0x00
+TextBC: DB CR, "BC = ", 0x00
+TextDE: DB CR, "DE = ", 0x00
+TextHL: DB CR, "HL = ", 0x00
+TextPC: DB CR, "PC = ", 0x00
+TextSP: DB CR, "SP = ", 0x00
+TextGreet1: DB CR, CR, "** Sys9080 is ready. RAM starts at ", 0x00
+TextPort DB " Input port = ", 0x00
+TextGreet2: DB " **", CR, " (Press BTN0 to show processor state, or BTN1 for ACIAs)", CR, 0x00
+TextACIA0: DB CR, "ACIA0 Rx status and data = ", 0x00
+TextACIA1: DB CR, "ACIA1 Rx status and data = ", 0x00
+End: DB 0x00 ;Cheap trick to see last used address
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/boot.asm
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/cpudiag.asm
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/cpudiag.asm (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/cpudiag.asm (revision 3)
@@ -0,0 +1,851 @@
+;***********************************************************************
+; MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980
+;***********************************************************************
+;
+;DONATED TO THE "SIG/M" CP/M USER'S GROUP BY:
+;KELLY SMITH, MICROCOSM ASSOCIATES
+;3055 WACO AVENUE
+;SIMI VALLEY, CALIFORNIA, 93065
+;(805) 527-9321 (MODEM, CP/M-NET (TM))
+;(805) 527-0518 (VERBAL)
+;
+BDOS EQU 00005H ;BDOS ENTRY TO CP/M
+WBOOT EQU 00000H ;RE-ENTRY TO CP/M WARM BOOT
+;
+;
+ ORG WBOOT; -- CPU starts here after reset
+ DI
+ JMP INIT
+;
+; -- Fake "BDOS", only implement functions 2 and 9 (https://www.seasip.info/Cpm/bdos.html)
+;
+ ORG BDOS;
+
+ PUSH PSW
+ MOV A, C
+ CPI 2
+ JZ C_WRITE
+ CPI 9
+ JZ C_WRITESTR
+DONE: POP PSW
+ RET
+
+C_WRITE: MOV A, E
+ OUT 00H
+ JMP DONE
+
+C_WRITESTR: LDAX D
+ CPI '$'
+ JZ DONE
+ OUT 00H
+ INX D
+ JMP C_WRITESTR
+
+INIT: LXI H, 0000H
+ DCX H
+ SPHL
+ EI
+ JMP CPU
+;
+;
+
+ ORG 00100H
+;
+;
+;
+ JMP CPU ;JUMP TO 8080 CPU DIAGNOSTIC
+;
+;
+;
+ DB 'MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC'
+ DB ' VERSION 1.0 (C) 1980'
+;
+;
+;
+
+;
+;
+;
+;MESSAGE OUTPUT ROUTINE
+;
+MSG: PUSH D ;EXILE D REG.
+ XCHG ;SWAP H&L REGS. TO D&E REGS.
+ MVI C,9 ;LET BDOS KNOW WE WANT TO SEND A MESSAGE
+ CALL BDOS
+ POP D ;BACK FROM EXILE
+ RET
+;
+;
+;
+;CHARACTER OUTPUT ROUTINE
+;
+PCHAR: MVI C,2
+ CALL BDOS
+ RET
+;
+;
+;
+BYTEO: PUSH PSW
+ CALL BYTO1
+ MOV E,A
+ CALL PCHAR
+ POP PSW
+ CALL BYTO2
+ MOV E,A
+ JMP PCHAR
+BYTO1: RRC
+ RRC
+ RRC
+ RRC
+BYTO2: ANI 0FH
+ CPI 0AH
+ JM BYTO3
+ ADI 7
+BYTO3: ADI 30H
+ RET
+;
+;
+;
+;************************************************************
+; MESSAGE TABLE FOR OPERATIONAL CPU TEST
+;************************************************************
+;
+OKCPU: DB 0CH,0DH,0AH,' CPU IS OPERATIONAL$'
+;
+NGCPU: DB 0CH,0DH,0AH,' CPU HAS FAILED! ERROR EXIT=$'
+;
+;
+;
+;************************************************************
+; 8080/8085 CPU TEST/DIAGNOSTIC
+;************************************************************
+;
+;NOTE: (1) PROGRAM ASSUMES "CALL",AND "LXI SP" INSTRUCTIONS WORK!
+;
+; (2) INSTRUCTIONS NOT TESTED ARE "HLT","DI","EI","RIM","SIM",
+; AND "RST 0" THRU "RST 7"
+;
+;
+;
+;TEST JUMP INSTRUCTIONS AND FLAGS
+;
+CPU: LXI SP,STACK ;SET THE STACK POINTER
+ ANI 0 ;INITIALIZE A REG. AND CLEAR ALL FLAGS
+ JZ J010 ;TEST "JZ"
+ CALL CPUER
+J010: JNC J020 ;TEST "JNC"
+ CALL CPUER
+J020: JPE J030 ;TEST "JPE"
+ CALL CPUER
+J030: JP J040 ;TEST "JP"
+ CALL CPUER
+J040: JNZ J050 ;TEST "JNZ"
+ JC J050 ;TEST "JC"
+ JPO J050 ;TEST "JPO"
+ JM J050 ;TEST "JM"
+ JMP J060 ;TEST "JMP" (IT'S A LITTLE LATE,BUT WHAT THE HELL!
+J050: CALL CPUER
+J060: ADI 6 ;A=6,C=0,P=1,S=0,Z=0
+ JNZ J070 ;TEST "JNZ"
+ CALL CPUER
+J070: JC J080 ;TEST "JC"
+ JPO J080 ;TEST "JPO"
+ JP J090 ;TEST "JP"
+J080: CALL CPUER
+J090: ADI 070H ;A=76H,C=0,P=0,S=0,Z=0
+ JPO J100 ;TEST "JPO"
+ CALL CPUER
+J100: JM J110 ;TEST "JM"
+ JZ J110 ;TEST "JZ"
+ JNC J120 ;TEST "JNC"
+J110: CALL CPUER
+J120: ADI 081H ;A=F7H,C=0,P=0,S=1,Z=0
+ JM J130 ;TEST "JM"
+ CALL CPUER
+J130: JZ J140 ;TEST "JZ"
+ JC J140 ;TEST "JC"
+ JPO J150 ;TEST "JPO"
+J140: CALL CPUER
+J150: ADI 0FEH ;A=F5H,C=1,P=1,S=1,Z=0
+ JC J160 ;TEST "JC"
+ CALL CPUER
+J160: JZ J170 ;TEST "JZ"
+ JPO J170 ;TEST "JPO"
+ JM AIMM ;TEST "JM"
+J170: CALL CPUER
+;
+;
+;
+;TEST ACCUMULATOR IMMEDIATE INSTRUCTIONS
+;
+AIMM: CPI 0 ;A=F5H,C=0,Z=0
+ JC CPIE ;TEST "CPI" FOR RE-SET CARRY
+ JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ CPI 0F5H ;A=F5H,C=0,Z=1
+ JC CPIE ;TEST "CPI" FOR RE-SET CARRY ("ADI")
+ JNZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ CPI 0FFH ;A=F5H,C=1,Z=0
+ JZ CPIE ;TEST "CPI" FOR RE-SET ZERO
+ JC ACII ;TEST "CPI" FOR SET CARRY
+CPIE: CALL CPUER
+ACII: ACI 00AH ;A=F5H+0AH+CARRY(1)=0,C=1
+ ACI 00AH ;A=0+0AH+CARRY(0)=0BH,C=0
+ CPI 00BH
+ JZ SUII ;TEST "ACI"
+ CALL CPUER
+SUII: SUI 00CH ;A=FFH,C=0
+ SUI 00FH ;A=F0H,C=1
+ CPI 0F0H
+ JZ SBII ;TEST "SUI"
+ CALL CPUER
+SBII: SBI 0F1H ;A=F0H-0F1H-CARRY(0)=FFH,C=1
+ SBI 00EH ;A=FFH-OEH-CARRY(1)=F0H,C=0
+ CPI 0F0H
+ JZ ANII ;TEST "SBI"
+ CALL CPUER
+ANII: ANI 055H ;A=F0H55H=50H,C=0,P=1,S=0,Z=0
+ CPI 050H
+ JZ ORII ;TEST "ANI"
+ CALL CPUER
+ORII: ORI 03AH ;A=50H3AH=7AH,C=0,P=0,S=0,Z=0
+ CPI 07AH
+ JZ XRII ;TEST "ORI"
+ CALL CPUER
+XRII: XRI 00FH ;A=7AH0FH=75H,C=0,P=0,S=0,Z=0
+ CPI 075H
+ JZ C010 ;TEST "XRI"
+ CALL CPUER
+;
+;
+;
+;TEST CALLS AND RETURNS
+;
+C010: ANI 000H ;A=0,C=0,P=1,S=0,Z=1
+ CC CPUER ;TEST "CC"
+ CPO CPUER ;TEST "CPO"
+ CM CPUER ;TEST "CM"
+ CNZ CPUER ;TEST "CNZ"
+ CPI 000H
+ JZ C020 ;A=0,C=0,P=0,S=0,Z=1
+ CALL CPUER
+C020: SUI 077H ;A=89H,C=1,P=0,S=1,Z=0
+ CNC CPUER ;TEST "CNC"
+ CPE CPUER ;TEST "CPE"
+ CP CPUER ;TEST "CP"
+ CZ CPUER ;TEST "CZ"
+ CPI 089H
+ JZ C030 ;TEST FOR "CALLS" TAKING BRANCH
+ CALL CPUER
+C030: ANI 0FFH ;SET FLAGS BACK!
+ CPO CPOI ;TEST "CPO"
+ CPI 0D9H
+ JZ MOVI ;TEST "CALL" SEQUENCE SUCCESS
+ CALL CPUER
+CPOI: RPE ;TEST "RPE"
+ ADI 010H ;A=99H,C=0,P=0,S=1,Z=0
+ CPE CPEI ;TEST "CPE"
+ ADI 002H ;A=D9H,C=0,P=0,S=1,Z=0
+ RPO ;TEST "RPO"
+ CALL CPUER
+CPEI: RPO ;TEST "RPO"
+ ADI 020H ;A=B9H,C=0,P=0,S=1,Z=0
+ CM CMI ;TEST "CM"
+ ADI 004H ;A=D7H,C=0,P=1,S=1,Z=0
+ RPE ;TEST "RPE"
+ CALL CPUER
+CMI: RP ;TEST "RP"
+ ADI 080H ;A=39H,C=1,P=1,S=0,Z=0
+ CP TCPI ;TEST "CP"
+ ADI 080H ;A=D3H,C=0,P=0,S=1,Z=0
+ RM ;TEST "RM"
+ CALL CPUER
+TCPI: RM ;TEST "RM"
+ ADI 040H ;A=79H,C=0,P=0,S=0,Z=0
+ CNC CNCI ;TEST "CNC"
+ ADI 040H ;A=53H,C=0,P=1,S=0,Z=0
+ RP ;TEST "RP"
+ CALL CPUER
+CNCI: RC ;TEST "RC"
+ ADI 08FH ;A=08H,C=1,P=0,S=0,Z=0
+ CC CCI ;TEST "CC"
+ SUI 002H ;A=13H,C=0,P=0,S=0,Z=0
+ RNC ;TEST "RNC"
+ CALL CPUER
+CCI: RNC ;TEST "RNC"
+ ADI 0F7H ;A=FFH,C=0,P=1,S=1,Z=0
+ CNZ CNZI ;TEST "CNZ"
+ ADI 0FEH ;A=15H,C=1,P=0,S=0,Z=0
+ RC ;TEST "RC"
+ CALL CPUER
+CNZI: RZ ;TEST "RZ"
+ ADI 001H ;A=00H,C=1,P=1,S=0,Z=1
+ CZ CZI ;TEST "CZ"
+ ADI 0D0H ;A=17H,C=1,P=1,S=0,Z=0
+ RNZ ;TEST "RNZ"
+ CALL CPUER
+CZI: RNZ ;TEST "RNZ"
+ ADI 047H ;A=47H,C=0,P=1,S=0,Z=0
+ CPI 047H ;A=47H,C=0,P=1,S=0,Z=1
+ RZ ;TEST "RZ"
+ CALL CPUER
+;
+;
+;
+;TEST "MOV","INR",AND "DCR" INSTRUCTIONS
+;
+MOVI: MVI A,077H
+ INR A
+ MOV B,A
+ INR B
+ MOV C,B
+ DCR C
+ MOV D,C
+ MOV E,D
+ MOV H,E
+ MOV L,H
+ MOV A,L ;TEST "MOV" A,L,H,E,D,C,B,A
+ DCR A
+ MOV C,A
+ MOV E,C
+ MOV L,E
+ MOV B,L
+ MOV D,B
+ MOV H,D
+ MOV A,H ;TEST "MOV" A,H,D,B,L,E,C,A
+ MOV D,A
+ INR D
+ MOV L,D
+ MOV C,L
+ INR C
+ MOV H,C
+ MOV B,H
+ DCR B
+ MOV E,B
+ MOV A,E ;TEST "MOV" A,E,B,H,C,L,D,A
+ MOV E,A
+ INR E
+ MOV B,E
+ MOV H,B
+ INR H
+ MOV C,H
+ MOV L,C
+ MOV D,L
+ DCR D
+ MOV A,D ;TEST "MOV" A,D,L,C,H,B,E,A
+ MOV H,A
+ DCR H
+ MOV D,H
+ MOV B,D
+ MOV L,B
+ INR L
+ MOV E,L
+ DCR E
+ MOV C,E
+ MOV A,C ;TEST "MOV" A,C,E,L,B,D,H,A
+ MOV L,A
+ DCR L
+ MOV H,L
+ MOV E,H
+ MOV D,E
+ MOV C,D
+ MOV B,C
+ MOV A,B
+ CPI 077H
+ CNZ CPUER ;TEST "MOV" A,B,C,D,E,H,L,A
+;
+;
+;
+;TEST ARITHMETIC AND LOGIC INSTRUCTIONS
+;
+ XRA A
+ MVI B,001H
+ MVI C,003H
+ MVI D,007H
+ MVI E,00FH
+ MVI H,01FH
+ MVI L,03FH
+ ADD B
+ ADD C
+ ADD D
+ ADD E
+ ADD H
+ ADD L
+ ADD A
+ CPI 0F0H
+ CNZ CPUER ;TEST "ADD" B,C,D,E,H,L,A
+ SUB B
+ SUB C
+ SUB D
+ SUB E
+ SUB H
+ SUB L
+ CPI 078H
+ CNZ CPUER ;TEST "SUB" B,C,D,E,H,L
+ SUB A
+ CNZ CPUER ;TEST "SUB" A
+ MVI A,080H
+ ADD A
+ MVI B,001H
+ MVI C,002H
+ MVI D,003H
+ MVI E,004H
+ MVI H,005H
+ MVI L,006H
+ ADC B
+ MVI B,080H
+ ADD B
+ ADD B
+ ADC C
+ ADD B
+ ADD B
+ ADC D
+ ADD B
+ ADD B
+ ADC E
+ ADD B
+ ADD B
+ ADC H
+ ADD B
+ ADD B
+ ADC L
+ ADD B
+ ADD B
+ ADC A
+ CPI 037H
+ CNZ CPUER ;TEST "ADC" B,C,D,E,H,L,A
+ MVI A,080H
+ ADD A
+ MVI B,001H
+ SBB B
+ MVI B,0FFH
+ ADD B
+ SBB C
+ ADD B
+ SBB D
+ ADD B
+ SBB E
+ ADD B
+ SBB H
+ ADD B
+ SBB L
+ CPI 0E0H
+ CNZ CPUER ;TEST "SBB" B,C,D,E,H,L
+ MVI A,080H
+ ADD A
+ SBB A
+ CPI 0FFH
+ CNZ CPUER ;TEST "SBB" A
+ MVI A,0FFH
+ MVI B,0FEH
+ MVI C,0FCH
+ MVI D,0EFH
+ MVI E,07FH
+ MVI H,0F4H
+ MVI L,0BFH
+ ANA A
+ ANA C
+ ANA D
+ ANA E
+ ANA H
+ ANA L
+ ANA A
+ CPI 024H
+ CNZ CPUER ;TEST "ANA" B,C,D,E,H,L,A
+ XRA A
+ MVI B,001H
+ MVI C,002H
+ MVI D,004H
+ MVI E,008H
+ MVI H,010H
+ MVI L,020H
+ ORA B
+ ORA C
+ ORA D
+ ORA E
+ ORA H
+ ORA L
+ ORA A
+ CPI 03FH
+ CNZ CPUER ;TEST "ORA" B,C,D,E,H,L,A
+ MVI A,000H
+ MVI H,08FH
+ MVI L,04FH
+ XRA B
+ XRA C
+ XRA D
+ XRA E
+ XRA H
+ XRA L
+ CPI 0CFH
+ CNZ CPUER ;TEST "XRA" B,C,D,E,H,L
+ XRA A
+ CNZ CPUER ;TEST "XRA" A
+ MVI B,044H
+ MVI C,045H
+ MVI D,046H
+ MVI E,047H
+ ;MVI H,(TEMP0 / 0FFH) ;HIGH BYTE OF TEST MEMORY LOCATION
+ MVI H,(TEMP0 >> 8) ;HIGH BYTE OF TEST MEMORY LOCATION
+ MVI L,(TEMP0 AND 0FFH) ;LOW BYTE OF TEST MEMORY LOCATION
+ MOV M,B
+ MVI B,000H
+ MOV B,M
+ MVI A,044H
+ CMP B
+ CNZ CPUER ;TEST "MOV" M,B AND B,M
+ MOV M,D
+ MVI D,000H
+ MOV D,M
+ MVI A,046H
+ CMP D
+ CNZ CPUER ;TEST "MOV" M,D AND D,M
+ MOV M,E
+ MVI E,000H
+ MOV E,M
+ MVI A,047H
+ CMP E
+ CNZ CPUER ;TEST "MOV" M,E AND E,M
+ MOV M,H
+ ;MVI H,(TEMP0 / 0FFH)
+ MVI H,(TEMP0 >> 8)
+ MVI L,(TEMP0 AND 0FFH)
+ MOV H,M
+ ;MVI A,(TEMP0 / 0FFH)
+ MVI A,(TEMP0 >> 8)
+ CMP H
+ CNZ CPUER ;TEST "MOV" M,H AND H,M
+ MOV M,L
+ ;MVI H,(TEMP0 / 0FFH)
+ MVI H,(TEMP0 >> 8)
+ MVI L,(TEMP0 AND 0FFH)
+ MOV L,M
+ MVI A,(TEMP0 AND 0FFH)
+ CMP L
+ CNZ CPUER ;TEST "MOV" M,L AND L,M
+ ;MVI H,(TEMP0 / 0FFH)
+ MVI H,(TEMP0 >> 8)
+ MVI L,(TEMP0 AND 0FFH)
+ MVI A,032H
+ MOV M,A
+ CMP M
+ CNZ CPUER ;TEST "MOV" M,A
+ ADD M
+ CPI 064H
+ CNZ CPUER ;TEST "ADD" M
+ XRA A
+ MOV A,M
+ CPI 032H
+ CNZ CPUER ;TEST "MOV" A,M
+ ;MVI H,(TEMP0 / 0FFH)
+ MVI H,(TEMP0 >> 8)
+ MVI L,(TEMP0 AND 0FFH)
+ MOV A,M
+ SUB M
+ CNZ CPUER ;TEST "SUB" M
+ MVI A,080H
+ ADD A
+ ADC M
+ CPI 033H
+ CNZ CPUER ;TEST "ADC" M
+ MVI A,080H
+ ADD A
+ SBB M
+ CPI 0CDH
+ CNZ CPUER ;TEST "SBB" M
+ ANA M
+ CNZ CPUER ;TEST "ANA" M
+ MVI A,025H
+ ORA M
+ CPI 037H
+ CNZ CPUER ;TEST "ORA" M
+ XRA M
+ CPI 005H
+ CNZ CPUER ;TEST "XRA" M
+ MVI M,055H
+ INR M
+ DCR M
+ ADD M
+ CPI 05AH
+ CNZ CPUER ;TEST "INR","DCR",AND "MVI" M
+ LXI B,12FFH
+ LXI D,12FFH
+ LXI H,12FFH
+ INX B
+ INX D
+ INX H
+ MVI A,013H
+ CMP B
+ CNZ CPUER ;TEST "LXI" AND "INX" B
+ CMP D
+ CNZ CPUER ;TEST "LXI" AND "INX" D
+ CMP H
+ CNZ CPUER ;TEST "LXI" AND "INX" H
+ MVI A,000H
+ CMP C
+ CNZ CPUER ;TEST "LXI" AND "INX" B
+ CMP E
+ CNZ CPUER ;TEST "LXI" AND "INX" D
+ CMP L
+ CNZ CPUER ;TEST "LXI" AND "INX" H
+ DCX B
+ DCX D
+ DCX H
+ MVI A,012H
+ CMP B
+ CNZ CPUER ;TEST "DCX" B
+ CMP D
+ CNZ CPUER ;TEST "DCX" D
+ CMP H
+ CNZ CPUER ;TEST "DCX" H
+ MVI A,0FFH
+ CMP C
+ CNZ CPUER ;TEST "DCX" B
+ CMP E
+ CNZ CPUER ;TEST "DCX" D
+ CMP L
+ CNZ CPUER ;TEST "DCX" H
+ STA TEMP0
+ XRA A
+ LDA TEMP0
+ CPI 0FFH
+ CNZ CPUER ;TEST "LDA" AND "STA"
+ LHLD TEMPP
+ SHLD TEMP0
+ LDA TEMPP
+ MOV B,A
+ LDA TEMP0
+ CMP B
+ CNZ CPUER ;TEST "LHLD" AND "SHLD"
+ LDA TEMPP+1
+ MOV B,A
+ LDA TEMP0+1
+ CMP B
+ CNZ CPUER ;TEST "LHLD" AND "SHLD"
+ MVI A,0AAH
+ STA TEMP0
+ MOV B,H
+ MOV C,L
+ XRA A
+ LDAX B
+ CPI 0AAH
+ CNZ CPUER ;TEST "LDAX" B
+ INR A
+ STAX B
+ LDA TEMP0
+ CPI 0ABH
+ CNZ CPUER ;TEST "STAX" B
+ MVI A,077H
+ STA TEMP0
+ LHLD TEMPP
+ LXI D,00000H
+ XCHG
+ XRA A
+ LDAX D
+ CPI 077H
+ CNZ CPUER ;TEST "LDAX" D AND "XCHG"
+ XRA A
+ ADD H
+ ADD L
+ CNZ CPUER ;TEST "XCHG"
+ MVI A,0CCH
+ STAX D
+ LDA TEMP0
+ CPI 0CCH
+ STAX D
+ LDA TEMP0
+ CPI 0CCH
+ CNZ CPUER ;TEST "STAX" D
+ LXI H,07777H
+ DAD H
+ MVI A,0EEH
+ CMP H
+ CNZ CPUER ;TEST "DAD" H
+ CMP L
+ CNZ CPUER ;TEST "DAD" H
+ LXI H,05555H
+ LXI B,0FFFFH
+ DAD B
+ MVI A,055H
+ CNC CPUER ;TEST "DAD" B
+ CMP H
+ CNZ CPUER ;TEST "DAD" B
+ MVI A,054H
+ CMP L
+ CNZ CPUER ;TEST "DAD" B
+ LXI H,0AAAAH
+ LXI D,03333H
+ DAD D
+ MVI A,0DDH
+ CMP H
+ CNZ CPUER ;TEST "DAD" D
+ CMP L
+ CNZ CPUER ;TEST "DAD" B
+ STC
+ CNC CPUER ;TEST "STC"
+ CMC
+ CC CPUER ;TEST "CMC
+ MVI A,0AAH
+ CMA
+ CPI 055H
+ CNZ CPUER ;TEST "CMA"
+ ORA A ;RE-SET AUXILIARY CARRY
+ DAA
+ CPI 055H
+ CNZ CPUER ;TEST "DAA"
+ MVI A,088H
+ ADD A
+ DAA
+ CPI 076H
+ CNZ CPUER ;TEST "DAA"
+ XRA A
+ MVI A,0AAH
+ DAA
+ CNC CPUER ;TEST "DAA"
+ CPI 010H
+ CNZ CPUER ;TEST "DAA"
+ XRA A
+ MVI A,09AH
+ DAA
+ CNC CPUER ;TEST "DAA"
+ CNZ CPUER ;TEST "DAA"
+ STC
+ MVI A,042H
+ RLC
+ CC CPUER ;TEST "RLC" FOR RE-SET CARRY
+ RLC
+ CNC CPUER ;TEST "RLC" FOR SET CARRY
+ CPI 009H
+ CNZ CPUER ;TEST "RLC" FOR ROTATION
+ RRC
+ CNC CPUER ;TEST "RRC" FOR SET CARRY
+ RRC
+ CPI 042H
+ CNZ CPUER ;TEST "RRC" FOR ROTATION
+ RAL
+ RAL
+ CNC CPUER ;TEST "RAL" FOR SET CARRY
+ CPI 008H
+ CNZ CPUER ;TEST "RAL" FOR ROTATION
+ RAR
+ RAR
+ CC CPUER ;TEST "RAR" FOR RE-SET CARRY
+ CPI 002H
+ CNZ CPUER ;TEST "RAR" FOR ROTATION
+ LXI B,01234H
+ LXI D,0AAAAH
+ LXI H,05555H
+ XRA A
+ PUSH B
+ PUSH D
+ PUSH H
+ PUSH PSW
+ LXI B,00000H
+ LXI D,00000H
+ LXI H,00000H
+ MVI A,0C0H
+ ADI 0F0H
+ POP PSW
+ POP H
+ POP D
+ POP B
+ CC CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ CNZ CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ CPO CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ CM CPUER ;TEST "PUSH PSW" AND "POP PSW"
+ MVI A,012H
+ CMP B
+ CNZ CPUER ;TEST "PUSH B" AND "POP B"
+ MVI A,034H
+ CMP C
+ CNZ CPUER ;TEST "PUSH B" AND "POP B"
+ MVI A,0AAH
+ CMP D
+ CNZ CPUER ;TEST "PUSH D" AND "POP D"
+ CMP E
+ CNZ CPUER ;TEST "PUSH D" AND "POP D"
+ MVI A,055H
+ CMP H
+ CNZ CPUER ;TEST "PUSH H" AND "POP H"
+ CMP L
+ CNZ CPUER ;TEST "PUSH H" AND "POP H"
+ LXI H,00000H
+ DAD SP
+ SHLD SAVSTK ;SAVE THE "OLD" STACK-POINTER!
+ LXI SP,TEMP4
+ DCX SP
+ DCX SP
+ INX SP
+ DCX SP
+ MVI A,055H
+ STA TEMP2
+ CMA
+ STA TEMP3
+ POP B
+ CMP B
+ CNZ CPUER ;TEST "LXI","DAD","INX",AND "DCX" SP
+ CMA
+ CMP C
+ CNZ CPUER ;TEST "LXI","DAD","INX", AND "DCX" SP
+ LXI H,TEMP4
+ SPHL
+ LXI H,07733H
+ DCX SP
+ DCX SP
+ XTHL
+ LDA TEMP3
+ CPI 077H
+ CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ LDA TEMP2
+ CPI 033H
+ CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ MVI A,055H
+ CMP L
+ CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ CMA
+ CMP H
+ CNZ CPUER ;TEST "SPHL" AND "XTHL"
+ LHLD SAVSTK ;RESTORE THE "OLD" STACK-POINTER
+ SPHL
+ LXI H,CPUOK
+ PCHL ;TEST "PCHL"
+;
+;
+;
+CPUER: LXI H,NGCPU ;OUTPUT "CPU HAS FAILED ERROR EXIT=" TO CONSOLE
+ CALL MSG
+ XTHL
+ MOV A,H
+ CALL BYTEO ;SHOW ERROR EXIT ADDRESS HIGH BYTE
+ MOV A,L
+ CALL BYTEO ;SHOW ERROR EXIT ADDRESS LOW BYTE
+ JMP WBOOT ;EXIT TO CP/M WARM BOOT
+;
+;
+;
+CPUOK: LXI H,OKCPU ;OUTPUT "CPU IS OPERATIONAL" TO CONSOLE
+ CALL MSG
+ JMP WBOOT ;EXIT TO CP/M WARM BOOT
+;
+; -------- RAM is implemented in top 256 bytes of the address space -------
+ ORG 0FF00H
+;
+TEMPP: DW TEMP0 ;POINTER USED TO TEST "LHLD","SHLD",
+ ; AND "LDAX" INSTRUCTIONS
+;
+TEMP0: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+TEMP1: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+TEMP2 DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+TEMP3: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+TEMP4: DS 1 ;TEMPORARY STORAGE FOR CPU TEST MEMORY LOCATIONS
+SAVSTK: DS 2 ;TEMPORARY STACK-POINTER STORAGE LOCATION
+;
+;
+;
+STACK EQU TEMPP+128 ;DE-BUG STACK POINTER STORAGE AREA
+;
+;
+;
+ END
+;
+;
+;
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/cpudiag.asm
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zmac.cmd
===================================================================
--- am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zmac.cmd (nonexistent)
+++ am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zmac.cmd (revision 3)
@@ -0,0 +1,13 @@
+@echo off
+if not exists ..\..\zmac.exe goto :error
+..\..\zmac.exe %f -8
+goto :end
+
+:error
+@echo zmac.exe not found!
+@echo download from http://48k.ca/zmac.html and place in same folder where Sys9080 is located
+errorlevel 1
+
+:end
+errorlevel 0
+
am9080_cpu_based_on_microcoded_am29xx_bit-slices/trunk/prog/zmac.cmd
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property