|
In TEST mode, the emulator can access all registers at any time. In EXPANDED or SINGLE mode,
the processor must run excecute a RESET. The following example shows, how the eXception. Activate
instruction can be used for generating an immediate reset:
; setup operation modes
SYStem.RESet
SYStem.CPU expanded
SYStem.Mode ee
; disable EPROM
Data.Set 3f 04
; map memory
MAP.DEFault 0--0ffff
; define reset vectors
Data.Set 0fffe %Word 1000
Data.Set 0bffe %Word 1000
; load sample program
Data.Assemble 1000--101f nop
Data.Assemble 1020 bra 1020
; example for option register programming
Data.Assemble 1010 ldaa #0
Data.Assemble , staa 39
; set 1st breakpoint, typically on 'main' in C program
Break.Set 1020 /Program
; activate cpu reset
eXception.Activate cpureset on
; start emulation
Go
; release cpu reset
eXception.Activate cpureset off
; check if o.k.
WAIT 0.1s
IF n:STATE.RUN():a:Register(pc)==1020
PRINT "Startup o.k."
ENDDO
|