Close

Loading Test Program

A project log for MIKBUG on Multicomp

MIKBUG Running on Multicomp with 6800 CPU

land-boardscomland-boards.com 06/29/2020 at 10:180 Comments

Wrote a small test program to get a character from the serial port and write it back to the serial port. Uses the MIKBUG serial in and out routines.

; TESTCODE.ASM
; DOS command line to assemble source
;     a68 TESTCODE.ASM -l TESTCODE.LST -s TESTCODE.s
; & to download S-record to card
; Copy/paste into PuTTY terminal

ACIACS	EQU	$FC18
ACIADA	EQU	$FC19

START	
			ORG	$0000
LBACK
		BSR		GETCHAR
		BSR		OUTPUTA
		JMP		LBACK
;
GETCHAR	PSHB
WAITIN	LDAB	ACIACS	; LOAD ACIA CONTROL REGISTER
	ASRB	        ; SHIFT RIGHT  ACIADA
	BCC 	WAITIN	; IF CARRY NOT SET THEN AGAIN
	LDAA 	ACIADA	; LOAD DATA REGISTER
	PULB		; RESTORE B REGISTER
	RTS
;
OUTPUTA	PSHB		; SAVE B
WAITOUT	LDAB	ACIACS	; LOAD ACIA CONTROL REGISTER
	ASRB		; SHIFT RIGHT
	ASRB		; SHIFT RIGHT
	BCC 	WAITOUT	; IF CARRY NOT SET DO AGAIN
	STAA 	ACIADA	; SEND CHARACTOR TO ACIA
	PULB		; RESTORE B
	RTS		; RETURN FROM ROUTINE

	END
		

 Assembles to:

                        ; TESTCODE.ASM
                        ; DOS command line to assemble source
                        ;     a68 TESTCODE.ASM -l TESTCODE.LST -s TESTCODE.s
                        ; & to download S-record to card
                        ; Copy/paste into PuTTY terminal
                        
   fc18                 ACIACS	EQU	$FC18
   fc19                 ACIADA	EQU	$FC19
                        ;
   0000                 START	
   0000                 			ORG	$0000
   0000                 LBACK
   0000   8d 05         	BSR		GETCHAR
   0002   8d 0f         	BSR		OUTPUTA
   0004   7e 00 00      	JMP		LBACK
                        ;
   0007   37            GETCHAR	PSHB
   0008   f6 fc 18      WAITIN	LDAB	ACIACS	; LOAD ACIA CONTROL REGISTER
   000b   57            	ASRB	        ; SHIFT RIGHT  ACIADA
   000c   24 fa         	BCC 	WAITIN	; IF CARRY NOT SET THEN AGAIN
   000e   b6 fc 19      	LDAA 	ACIADA	; LOAD DATA REGISTER
   0011   33            	PULB		; RESTORE B REGISTER
   0012   39            	RTS
                        ;
   0013   37            OUTPUTA	PSHB		; SAVE B
   0014   f6 fc 18      WAITOUT	LDAB	ACIACS	; LOAD ACIA CONTROL REGISTER
   0017   57            	ASRB		; SHIFT RIGHT
   0018   57            	ASRB		; SHIFT RIGHT
   0019   24 f9         	BCC 	WAITOUT	; IF CARRY NOT SET DO AGAIN
   001b   b7 fc 19      	STAA 	ACIADA	; SEND CHARACTOR TO ACIA
   001e   33            	PULB		; RESTORE B
   001f   39            	RTS		; RETURN FROM ROUTINE

   0020                 	END
fc18  ACIACS        fc19  ACIADA        0007  GETCHAR       0000  LBACK     
0013  OUTPUTA       0000  START         0008  WAITIN        0014  WAITOUT   


S-Record file:

S11300008D058D0F7E000037F6FC185724FAB6FCD8
S113001019333937F6FC18575724F9B7FC19333913
S9030020DC

Downloaded to the card.

Works! 

Discussions