True, and QLib unmodified does not run on the Q60 with copyback enabled, at the moment it needs Wolfgang Lenerz's patch programs.pjw wrote:
Q_ERR_xxx figures largely in the Qlib compiler itself..
Cheers
True, and QLib unmodified does not run on the Q60 with copyback enabled, at the moment it needs Wolfgang Lenerz's patch programs.pjw wrote:
Q_ERR_xxx figures largely in the Qlib compiler itself..
Is there a system trap, or vector to do this.Mark Swift wrote: Sat Jul 12, 2025 1:01 pm Hi,
It's likely that the data cache will need to be flushed out to memory after this routine; before it can be executed as code.
ThanksCode: Select all
; Make 28 copies of this code in allocated buffer L014E clr.l (a0)+ move.l #$207AFFFA,(a0)+ ;movea.l $01FFFC(pc),a0 move.l #$4E903D40,(a0)+ ;jsr (a0) move.l #$00C27000,(a0)+ ;move.w d0,lv_qerno(a6) move.w #$4E75,(a0)+ ;moveq #$00,d0 ;rts dbf d1,L014E ;loop
I may be wrong, but I don't believe that there is a system trap.
Copyback is only available on 68040+. Offset 161 in the system variables should hold the processor type (68040=$40).Martin_Head wrote: Sun Jul 13, 2025 1:03 pm And is it 68060/Q60 specific. If so, how could I test for a Q60.
Code: Select all
cmpi.b #$40,$A1(a6)
bls.s NOPUSH skip if 040 or less
dc.w $4E7A,$0002 movec cacr,d0
tst.w d0 check 040 bits
bpl.s NOPUSH branch if data cache off
dc.w $F478 cpusha dc ; update memory from cache
NOPUSH:
Code: Select all
move.w sr,d6 ;save the status register
trap #$00 ;enter supervisor mode
adda.l a6,a1 ;make A1 absolute
moveq #$00,d2
move.b (a1)+,d2 ;get names length byte
suba.l a0,a0 ;zero A0
moveq #-$01,d3 ;timeout
moveq #iob.smul,d0 ;IO.SSTRG Send MULtiple bytes
trap #$03
move.w d6,sr ;restore status register, and back into user mode
Move to SR is always privileged, move from SR is privileged on the 68010+.Mark Swift wrote: Sun Jul 13, 2025 2:39 pm Moving to and from the SR is a privileged instruction on 68010+
Although; QDOS Classic emulates the instruction and I assume that SMSQ/E will do the same.