diff --git a/doc/Editor.md b/doc/Editor.md index e88d26b..4d0b5f0 100644 --- a/doc/Editor.md +++ b/doc/Editor.md @@ -37,61 +37,99 @@ MEMORY FOR THE TEXT BUFFER. IT HAS TWO MODES, COMMAND AND EDIT. - EDIT COMMANDS: +EDIT COMMANDS: - LEFT ARROW = MOVE CHAR LEFT - RIGHT ARROW = MOVE CHAR RIGHT - UP ARROW = MOVE LINE UP - DOWN ARROW = MOVE LINE DOWN - CTRL-K = MOVE LINE UP - CTRL-J = MOVE LINE DOWN - CTRL-A = JUMP LEFT - CTRL-S = JUMP RIGHT - CTRL-W = JUMP UP - CTRL-Z = JUMP DOWN - CTRL-Q = JUMP BEGIN - CTRL-E = JUMP END - CTRL-D = DELETE CHAR - CTRL-X = DELETE LINE - CTRL-V = COPY DELETED LINE - CTRL-O = OPEN NEW LINE - CTRL-F = OPEN A FOLLOWING NEW LINE - CTRL-T = JOIN LINES - CTRL-I = TOGGLE INSERT/OVERWRITE - ESCAPE = SWITCH TO COMMAND MODE + LEFT ARROW = MOVE CHAR LEFT + RIGHT ARROW = MOVE CHAR RIGHT + UP ARROW = MOVE LINE UP + DOWN ARROW = MOVE LINE DOWN + CTRL-K = MOVE LINE UP + CTRL-J = MOVE LINE DOWN + CTRL-A = JUMP LEFT + CTRL-S = JUMP RIGHT + CTRL-W = JUMP UP + CTRL-Z = JUMP DOWN + CTRL-Q = JUMP BEGIN + CTRL-E = JUMP END + CTRL-D = DELETE CHAR + CTRL-X = DELETE/CUT LINE + CTRL-V = COPY DELETED LINE + CTRL-O = OPEN NEW LINE + CTRL-F = OPEN A FOLLOWING NEW LINE + CTRL-T = JOIN LINES + CTRL-B = TOGGLE INSERT/OVERWRITE + TAB/CTRL-I = INSERT SPACES TO NEXT TAB + ESCAPE = SWITCH TO COMMAND MODE + DELETE = DELETE CHAR LEFT APPLE ][ FEATURES: + ------------------ - SHIFT-M = ] - CTRL-N = [ - CTRL-P = _ - CTRL-B = | - CTRL-Y = ~ - CTRL-L = SHIFT LOCK + SHIFT-M = ] + CTRL-N = [ + SHIFT-CTRL-N = ~ + CTRL-P = \ + SHIFT-CTRL-P = | + CTRL-G = _ + CTRL-L = SHIFT LOCK SHIFT-LEFT ARROW = DELETE (SHIFT-MOD) WITH THE SHIFT-KEY MOD ON AN APPLE ][, UPPER AND LOWER CASE ENTRY WORKS AS EXPECTED. - CTRL-C = FORCE LOWER-CASE CHARS + CTRL-C = FORCE LOWER-CASE CHARS - IF YOU HAVE A LOWER-CASE CHARACTER - GENERATOR INSTALLED, YOU CAN FORCE - LOWER-CASE DISPLAY. OTHERWISE, - UPPER CASE WILL BE DISPLAYED NORMALLY - BUT lower-case will be displayed in + If you have a lower-case character + generator installed, you can force + lower-case display. Otherwise, + upper case will be displayed normally + but lower-case will be displayed in inverse. This is the default. Apple //e AND //c FEATURES: + --------------------------- - THE 'CLOSED-APPLE' KEY WILL MODIFY - THE ARROW KEYS INTO THEIR JUMP - EQUIVALENTS. IT WILL ALSO MODIFY - THE 'RETURN' KEY TO OPEN UP A LINE, - JUST LIKE CTRL-F. + The 'SOLID-APPLE' key will modify + theese keys: - COMMAND MODE: + SA-RETURN = OPEN LINE + SA-LEFT ARROW = JUMP LEFT + SA-RIGHT ARROW = JUMP RIGHT + SA-UP ARROR = JUMP UP + SA-DOWN ARROW = JUMP DOWN + + Apple /// FEATURES: + ------------------- + + The 'OPEN-APPLE' key will modify + these keys: + + OA-\ = DELETE CHAR LEFT + OA-RETURN = OPEN LINE + OA-LEFT ARROW = JUMP LEFT + OA-RIGHT ARROW = JUMP RIGHT + OA-UP ARROR = JUMP UP + OA-DOWN ARROW = JUMP DOWN + + On the keypad, 'OPEN-APPLE' allows + the keys for navigation and misc: + + OA-4 = MOVE CHAR LEFT + OA-6 = MOVE CHAR RIGHT + OA-8 = MOVE LINE UP + OA-2 = MOVE LINE DOWN + OA-9 = JUMP UP + OA-3 = JUMP DOWN + OA-7 = JUMP BEGIN + OA-1 = JUMP END + OA-5 = DELETE CHAR + OA-- = DELETE/CUT LINE + OA-0 = COPY DELETED LINE + OA-ENTER = OPEN NEW LINE + OA-. = TOGGLE INSERT/OVERWRITE + +COMMAND MODE: [OPTIONAL PARAMETER] diff --git a/src/libsrc/sane.pla b/src/libsrc/sane.pla index d09fd7a..ea79ca3 100644 --- a/src/libsrc/sane.pla +++ b/src/libsrc/sane.pla @@ -837,8 +837,10 @@ def fpInit() fpzpsave = heapalloc($0034*2) (@fixupXS)=>1 = fpzpsave+$34 (@fixupXR)=>1 = fpzpsave+$34 - sane[9] = @zpSaveX - sane[10] = @zpRestoreX + zpSaveX // Clear XBYTEs + heaprelease(fpzpsave) + sane[9] = @zpNopSave//zpSaveX + sane[10] = @zpNopRestore//zpRestoreX else // Apple II fpzpsave = heapalloc($0034) sane[9] = @zpSave diff --git a/src/toolsrc/ed.pla b/src/toolsrc/ed.pla index 135db79..2a96be4 100755 --- a/src/toolsrc/ed.pla +++ b/src/toolsrc/ed.pla @@ -33,6 +33,7 @@ const keyctrlc = $83 const keyctrld = $84 const keyctrle = $85 const keyctrlf = $86 +const keyctrlg = $87 const keyctrli = $89 const keyctrlk = $8B const keyctrll = $8C @@ -569,15 +570,6 @@ end // // Keyboard routines // -def dev_status(devnum, code, list) - byte params[5] - - params.0 = 3 - params.1 = devnum - params.2 = code - params:3 = list - return syscall($82, @params) -end def dev_control(devnum, code, list)#1 byte params[5] @@ -588,13 +580,80 @@ def dev_control(devnum, code, list)#1 perr = syscall($83, @params) return perr end +def cons_keyavail + byte params[5] + byte count + + params.0 = 3 + params.1 = cmdsys.devcons + params.2 = 5 + params:3 = @count + return syscall($82, @params) ?? 0 :: count +end +def cons_keyread + byte params[8] + byte key + + params.0 = 4 + params.1 = cmdsys.refcons + params:2 = @key + params:4 = 1 + params:6 = 0 + syscall($CA, @params) + return params:6 ?? key :: 0 +end def keyin3 - byte count, key + byte key + repeat cursflash - dev_status(cmdsys.devcons, 5, @count) - until count - key = getc + until cons_keyavail + key = cons_keyread + if key & $80 // Open Apple modifier + when key + is keyarrowleft + key = keyctrla; break + is keyarrowright + key = keyctrls; break + is keyarrowup + key = keyctrlw; break + is keyarrowdown + key = keyctrlz; break + is keyenter + key = keyctrlf; break + is $80 | '\\' + key = keydelete; break // Delete + is keyenter + key = keyctrlf; break + // + // Map OA+keypad + // + is $80 | '4' + key = keyarrowleft; break + is $80 | '6' + key = keyarrowright; break + is $80 | '8' + key = keyarrowup; break + is $80 | '2' + key = keyarrowdown; break + is $80 | '7' + key = keyctrlq; break // Top + is $80 | '1' + key = keyctrle; break // Bottom + is $80 | '9' + key = keyctrlw; break // Pg Up + is $80 | '3' + key = keyctrlz; break // Pg Dn + is $80 | '5' + key = keyctrld; break // Del + is $80 | '.' + key = keyctrlb; break // Ins + is $80 | '0' + key = keyctrlv; break // Copy + is $80 | '-' + key = keyctrlx; break // Cut + wend + fin return key | $80 end def keyin2e @@ -634,14 +693,18 @@ def keyin2 until key >= 128 ^keystrobe if key == keyctrln - key = $DB // [ + key = $DB // '[' + elsif key == $9E // SHIFT+CTRL+N + key = $FE // '~' elsif key == keyctrlp - key = $DF // _ - elsif key == keyctrlb - key = $DC // \ + key = $DC // '\' + elsif key == $80 // SHIFT+CTRL+P -> CTRL+@ + key = $FC // '|' + elsif key == keyctrlg + key = $DF // '_' elsif key == keyarrowleft if ^pushbttn3 < 128 - key = $FF + key = keydelete fin elsif key >= $C0 and flags < shiftlock if ^pushbttn3 < 128 @@ -1060,7 +1123,7 @@ def cmdmode#0 word cmdptr clrscrn - puts("PLASMA Editor, Version 1.0\n") + puts("PLASMA Editor, Version 1.01\n") while not exit puts(@filename) cmdptr = gets($BA)