Finally I fixed the Trace function in ASSIST09. It appeared the only MC6840 I had was faulty. Replaced this with a HD63B40 and trace works as expected. Here a selective screendump (comment after the ;):
>D 0000 001F ; Dump memory locations of the HelloWorld program
0 1 2 3 4 5 6 7 8 9 A B C D E F
0000 30 8D 00 06 3F 03 3F 06 3F 08 48 65 6C 6C 6F 20 0...?.?.?.Hello
0010 57 6F 72 6C 64 04 FF 00 FF D7 FF E2 BF 00 FF 00 World...........
>
>G 0000 ; Run the program.
Hello World
>R ; Change the Program Counter to the start of the program
PC-000A A-2E B-94 X-000A Y-18B2 U-A400 S-181C CC-F4 DP-18
PC-0000
; Typing '.' at the cursor generates this output
>.OP-308D PC-0004 A-2E B-94 X-000A Y-18B2 U-A400 S-181C CC-F0 DP-18
>.OP-3F03 PC-FFE8 A-2E B-94 X-000A Y-18B2 U-A400 S-1810 CC-F0 DP-18
>.OP-6E9D PC-F895 A-2E B-94 X-000A Y-18B2 U-A400 S-1810 CC-F0 DP-18
>.
Hello WorldOP-0C90 PC-FA3B A-01 B-F0 X-0016 Y-18B2 U-A400 S-1810 CC-F4 DP-18
>.OP-3B04 PC-0006 A-2E B-94 X-000A Y-18B2 U-A400 S-181C CC-F0 DP-18
>.OP-3F06 PC-FFE8 A-2E B-94 X-000A Y-18B2 U-A400 S-1810 CC-F0 DP-18
>.OP-6E9D PC-F895 A-2E B-94 X-000A Y-18B2 U-A400 S-1810 CC-F0 DP-18
>.
OP-0C90 PC-FA3B A-01 B-F0 X-FA3D Y-18B2 U-A400 S-1810 CC-F4 DP-18
>.OP-3B04 PC-0008 A-2E B-94 X-000A Y-18B2 U-A400 S-181C CC-F0 DP-18
>
; Cool thing is that the trace works with both RAM and ROM based code.
Below the listing of the HelloWorld program
; Source: https://www.youtube.com/watch?v=C_q_RNpLNHo&t=1522s
;*************************************************************************
; HelloWorld.asm
;
; A simple 'Hello World' characher output test.
; for ASSIST09 based system.
; Call with ASSIST09 'G' Go Subroutine command to Entry address.
;
; Author: Greg
; Date: 15/02/2002
; Modified for SWI $08, fjkraan, 20250827
;*************************************************************************
0000 Entry EQU $0000
0003 PDATA EQU $03
0006 PCRLF EQU $06
0004 EOT EQU $04
0008 MONITR EQU $08
;
ORG Entry
; LDX #Message is how we would normally load the index register pointer.
; ie. Simply loading X with an absolute address.
; But LEAX is the MC6809 Load Effective Address approach which generates
; preferable and more flexible "position independent code".
; ie. Load X with the Program Counter Relative address of the Message.
0000 308D0006 LEAX Message,PCR
; Call the PDATE service routine.
0004 3F SWI
0005 03 FCB PDATA
; Call the PCRLF service routine.
0006 3F SWI
0007 06 FCB PCRLF
; Return to Monitor.
0008 3F SWI
0009 08 FCB MONITR
000A 48656C6C6F2057 Message FCC "Hello World"
0011 6F726C64
0015 04 FCB EOT
END
SYMBOL TABLE
ENTRY 00 0000 EOT 00 0004 MESSAGE 02 000A MONITR 00 0008
PCRLF 00 0006 PDATA 00 0003
6 SYMBOLS
0 error(s), 0 warning(s)
fjkraan
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.