1331Re: Programming Help
- Sep 1, 2003Will,
> I then attempted placing a small patch of code at 0xF4F0 to set theprogram
> counter to R3 as the program assumes it to be already set. I wouldthen
> execute the program by jumping to F4F0 from the Monitor ROM.This code will branch you to 0xF0F4, is that where you want to go?
> F4F0 F8 F4 A3 R3.0 = F4
> F4F3 F8 F0 B3 R3.1 = F0
> F4F6 D3 PC = R3
Where is this relocator?
Here, try this code... I entered it in HEX, your favorite.
It's the same code I posted earlier, except this time
in machine language. It basically moves memory to ram until
16k ram is full. It does not modify any code along the way.
The table must start at xx00, but the stored programs can
start at any location. Jump to FFE6 to run it.
Change FFEA to any page to relocate this code.
FF00 80 00 pgmtable .dw $8000 start of program 0
FF02 82 00 .dw $8200 start of program 1
FF04 86 45 .dw $8645 start of program 2
FFE6 6C inp 4
FFE7 FE shl ;x2 for address words
FFE8 AD plo rd ;Table must start at xx02
FFE9 F8 FF ldi pgmtable/256 ;rD points to table
FFEB BD phi rd
;set starting write address
FFEC F8 00 ldi 0 ;Write to 0000
FFEE AE plo rE
FFEF BE phi rE ;rE points to destination
FFF0 4D lda rd ;get address of first 2 pages
FFF1 BC phi rc
FFF2 4D lda rd
FFF3 AC plo rc ;rC points to source
FFF4 4C RRLoop lda rc ;read a source byte (and advance)
FFF5 5E str rE ;write a destination byte
FFF6 1E INC rE ;(and advance)
FFF7 9E ghi rE ;Test for end of RAM
FFF8 FE shl ;x2
FFF9 FE shl ;x4 for 16K ram check
FFFA 3B F4 bnf RRLoop
FFFC C0 00 00 lbr 0000
> The above did not seam to work either. I do not have originalbinary or any
> better than what was in the .PDF.What are you programming your eeprom with?
Good luck, the code is as small and simple as possible.
- << Previous post in topic Next post in topic >>