The text screen starts at address $400 and ends at address $5FF, so any STA instruction to any address within that range (inclusive) will print the contents A to the screen. Try the following which should output all 256 text mode characters near the middle of the screen, you may omit the delay loop if desired:
CLRA
LOOP STA $4EF ; Store A at address $4EF
LDY #$800 ; Delay value, the larger the value the greater the delay
DELAY LEAY -1,Y ; Part of the delay loop
BNE DELAY ; End of the delay loop
INCA
BNE LOOP
Note that the STA ,X+ instruction in the example you gave earlier stores the contents of A to the address value contained in X then increments X. This is used to fill the whole text screen with the contents of A.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
10 ' MACHINE CODE LOADER
20 READ LA ' LA = LOAD ADDRESS (START OF PROGRAM)
30 READ EA ' EA = ADDRESS OF FIRST INSTRUCTION
40 PA = EA 'TO BE EXECUTED
50 READ HB$ ' HEX CONSTANTS
60 IF HB$="END" THEN 100
70 POKE PA,VAL("&H"+HB$) ' POKE VALUE INTO MEMORY
80 PA = PA + 1 ' INCREMENT ADDRESS
90 GOTO 50
100 PRINT "AUTORUN WITH EXEC";EA;":"
105 PRINT "-------------------------------"
110 EXEC EA ' AUTORUN
114 PRINT
115 PRINT "-------------------------------"
120 PRINT "END ADDRESS:"; PA-1
130 PRINT "RUN AGAIN WITH EXEC";EA
149 ' LOAD ADDRESS:
150 DATA 20001
159 ' EXECUTE ADDRESS:
160 DATA 20001
165 ' MACHINE CODE IN HEX
170 DATA 34,12 ' PSHS A,X ; Save registers A, X
180 DATA CC,58,58 ' LDD $5858 ; $5858 == 22616
190 DATA BD,95,7A ' JSR 38266 ; outputs the decimal value of D register
260 DATA 35,92 ' PULS A,X,PC ; Restore and return
270 DATA END
It display 22616 on screen
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
You'd surely find it easier to use an assembler like DREAM. It's straightforward to launch (execute) the assembled program within DREAM too. If you have ALLDREAM then it comes with the DREAMBUG debugger built-in, which isn't especially easy to use but can be handy at times.
I have tried ALLDREAM and ", without success. I get always "FULL"
I looked into Dragondata_alldream_manual.pdf and it seems that's very complicated to use, isn't it?
I also tried DskDream for Dragon DOS, but can't LOAD or RUN in XRoar. The emulator hangs.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Coding on the machine, my preferred variant was DOS-Dream (you get DOS, you get an assembler, you don't have to lose any RAM to the assembler, bar your own program text).
Not too complicated, just a little terse as anything that has to fit in such a small space is bound to be.
If you're getting FULL when trying to start DREAM then you haven't allocated any/enough memory with CLEAR.
The built-in editor is pretty easy to use IMO; certainly much easier than BASIC. There's not much more you need to know to get started and most of it is on page 27 of the manual. BREAK then A to assemble. BREAK then X to execute or BREAK Q to go back to editing.
If you're assembling by hand you'll surely find the complexity too much trouble before long!
sixxie wrote:Not too complicated, just a little terse as anything that has to fit in such a small space is bound to be.
Good idea!
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809