According to the documentation of LOCATE this keyword is not supported for PET targets.
I used this code to successfully position the cursor using the Kernal editor ROM routine to set screen pointers:
pha ; store current content of accumulator
lda #$07 ; set column (X) to 7
sta SCR_COL
lda #$02 ; set row/line (Y) to 2
sta SCR_ROW
pla ; re-store accumulator content
jsr SET_SCR_PTR ; set screen pointers
SCR_COL is $E2 for BASIC 1 and $C6 for BASIC 2 & BASIC 4.
SCR_ROW is $F5 for BASIC 1 and $D8 for BASIC 2 & BASIC 4.
SET_SCR_PTR is $E5DB for BASIC 1, $E25D for BASIC 2, $E071 for BASIC 4 (40 columns) and $E067 for BASIC 4 (80 columns); I haven't found the address for BASIC 1, BASIC 2 and BASIC 4 (40 column) yet.
According to the documentation of
LOCATEthis keyword is not supported for PET targets.I used this code to successfully position the cursor using the
Kernaleditor ROM routine to set screen pointers:SCR_COLis$E2for BASIC 1 and$C6for BASIC 2 & BASIC 4.SCR_ROWis$F5for BASIC 1 and$D8for BASIC 2 & BASIC 4.SET_SCR_PTRis$E5DBfor BASIC 1,$E25Dfor BASIC 2,$E071for BASIC 4 (40 columns) and$E067for BASIC 4 (80 columns);I haven't found the address for BASIC 1, BASIC 2 and BASIC 4 (40 column) yet.