Skip to content

Commit 52f2c8a

Browse files
authored
added provison for SWATCH debg timr in hb63c09m
added debug timer support to the program to verify the approximate runtime.
1 parent 0381f6b commit 52f2c8a

File tree

3 files changed

+208
-199
lines changed

3 files changed

+208
-199
lines changed

hb63c09/hb-mand.asm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@
99

1010
;; lets enable 6309 since the CPU is required for the architecture of the computer
1111
h6309 EQU 1
12+
SWATCH EQU $A03D ; dumb stop watch routine
1213
ORG $1000 ; Jump to this location with G 1000 in MON09 or ASSIST9
1314
CONFIG:
1415
ifdef h6309
1516
LDMD #1 ; h6309 native mode
1617
endif
1718

19+
LDA SWATCH ;should display "start" and start the debugger watch
1820
;; main loop
1921
LEAS -5,S ; Allocate 5 bytes on the stack
2022
CLR ,S ; Clear X (temp low byte)
2123
CLR 1,S ; Clear X (temp high byte)
2224
CLR 2,S ; Clear Y (temp low byte)
2325
CLR 3,S ; Clear Y (temp high byte)
2426
; Dispite what mand_get says in mandelbrot.asm itterations is in 6,S
25-
27+
2628
loop:
2729
LBSR mand_get ; Compute Mandelbrot for current position
2830
LBSR PLOT ; Map result to a gradient character and send it to UART
@@ -47,6 +49,7 @@ loop:
4749
LEAS 5,S ; Deallocate stack
4850

4951
DONE:
52+
LDA SWATCH ; should print the milliseconds delay.
5053
ifdef h6309
5154
LDMD #0 ; h6809 emulation mode
5255
endif

0 commit comments

Comments
 (0)