Hi amenjet, can your tracer be used in the following method? It will be very helpful if you can get a trace for this.. It might be the fastest way in.
Background: The problem is solved for 33-LA.rom, any non-zero value put in address $2408 immediately before calling PK$save, but it only works for that early ROM despite there being relatively few differences between the relevant code there and in 36-LA.rom, and there are three TST $2408 instructions, and I don't know which if any is the right one to examine closely. If references to the address are made in the form of offset relative to address in X, the possibilities might be too many to discover easily.
What might narrow it down is if you can run the test program twice for 33-LA.rom with a change of the value in $2408 from 0 to NOT 0, tracing to get a different result in each case, comparing those traces might find the best info yet.
The following code is a variant of the one in the previous post, but instead of forcing a byte value, it uses OIM to set bits because from what I've seen in code, Psion like doing this, so I assume that there may be existing bits they want left alone during the process. For now, this is not important, it will likely only apply to ROM later than 33-LA, so knowing how 33-LA changes its actions when that byte at $2408 is set or reset immediately before calling PK$save is enough to work with for now.
Code: Select all
A:
LOCAL M$(12),C%(13)
M$="PK$save Test"
OPEN "B:MAIN",A,A$ :FIRST :CLOSE :rem saves a lot of machine code if you do this first.
C%(1)=$3F2D :rem SWI FL$frec
C%(2)=$DC41 :rem LDAB 0m
C%(3)=$3F60 :rem SWI PK$sadd
C%(4)=$01CE :rem NOP,LDX byte address.
C%(5)=$2408 :rem Byte address for tests.
C%(6)=$0162 :rem NOP,OIM BYTE at OFFSET from X
C%(7)=$FF00 :rem FF OR BYTE at $2408 (maybe try $2407 too).
C%(8)=$01CC :rem NOP,LDD Byte count
C%(9)=12 :rem BYTE COUNT
C%(10)=$01CE :rem NOP,LDX Source string
C%(11)=ADDR(M$)+1
C%(12)=$3F61 :rem SWI PK$save
C%(13)=$3900
USR(ADDR(C%()),1)