Skip to content

PET: Support for LOCATE to position cursor #271

@kochs-online

Description

@kochs-online

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions