1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-19 09:23:06 +00:00

Further fix some VIDEX 80 column issues

This commit is contained in:
David Schmenk
2025-03-03 10:21:51 -08:00
parent 27785e8513
commit 87ef9a9a2d
5 changed files with 68 additions and 78 deletions
+9 -8
View File
@@ -2,8 +2,8 @@ WELCOME TO THE PLASMA EDITOR!
=============================
FIRST THINGS FIRST:
TO NAVIGATE, USE THE ARROW KEYS. ON
THE APPLE ][:
TO NAVIGATE, USE THE ARROW KEYS.
ON THE APPLE ][:
CTRL-K = UP
CTRL-J = DOWN.
@@ -33,8 +33,9 @@ EDITOR ONLY SUPPORTS 40 COLUMN TEXT
ALTHOUGH LINES CAN BE UP TO 79
CHARACTERS LONG. THE SCREEN WILL
SCROLL HORIZONTALLY AS THE CURSOR
MOVES. THERE IS 16K OF MEMORY FOR
THE TEXT BUFFER.
MOVES. THERE IS ABOUT 16K TO 30K
OF MEMORY FOR THE TEXT BUFFER,
DEPENDING ON YOUR CONFIGURATION.
IT HAS TWO MODES, COMMAND AND EDIT.
@@ -59,8 +60,8 @@ EDIT COMMANDS:
CTRL-V = PASTE CLIPBOARD
CTRL-O = OPEN NEW LINE
CTRL-F = OPEN A FOLLOWING NEW LINE
CTRL-T = JOIN LINES
CTRL-Y = TOGGLE INSERT/OVERWRITE
CTRL-Y = JOIN LINES
CTRL-T = TOGGLE INSERT/OVERWRITE
TAB/CTRL-I = INSERT SPACES TO NEXT TAB
= INDENT SELECTION IF INSERT MODE
= UNDENT SELECTION IF OVERWITE MODE
@@ -96,7 +97,7 @@ EDIT COMMANDS:
---------------------------
The 'SOLID-APPLE' key will modify
theese keys:
these keys:
SA-RETURN = OPEN FOLLOWING LINE
SA-LEFT ARROW = JUMP LEFT
@@ -120,7 +121,7 @@ EDIT COMMANDS:
OA-TAB = DETAB
Apple //e Platinum AND /// FEATURES:
-------------------
------------------------------------
On the keypad, 'OPTION' on //e Plat
or 'OPEN-APPLE' on the /// allows
Binary file not shown.
+32 -46
View File
@@ -506,16 +506,6 @@ def a2egetkey
^keystrobe
return (^pushbttn2 & $80) | (key & $7F)
end
def a2cgetkey
byte key
^$C079 = 0 // IOU enable and clear VBL int on //c
^$C05B = 0 // Enable VBL Ints on //c
key = a2egetkey
^$C05A = 0 // Disable VBL Ints on //c
^$C078 = 0 // IOU disable on //c
return key
end
def a2clear(clr)
when clr
is cleol // clear EOL
@@ -530,7 +520,7 @@ def a2clear(clr)
wend
return 0
end
def a2clear80e(clr)
def a2clear80(clr)
when clr
is cleol // clear EOL
cout(29) // GS
@@ -544,20 +534,6 @@ def a2clear80e(clr)
wend
return 0
end
def a2clear80v(clr)
when clr
is cleol // clear EOL
cout(29) // CLEOL
break
is cls
cout(12) // FF
break
is cleos // clear OES
cout(11) // VT
break
wend
return 0
end
def a2gotoxy(x, y)
^CURSH = x
return call($FB5B, y + ^WNDTOP, 0, 0, 0) // TABV
@@ -693,11 +669,23 @@ def a2ctrl80v(code, param)#1
handled = TRUE
break
is ctrlcursor
if param
flags = flags | showcurs
else
flags = flags & ~showcurs
fin
when param
is OFF
flags = flags & ~showcurs
^$C0B0 = $0A
^$C0B1 = $0F
//break
is INVERSE
flags = flags | showcurs
^$C0B0 = $0A
^$C0B1 = $00
break
otherwise
flags = flags | showcurs
^$C0B0 = $0A
^$C0B1 = $C0
break
wend
handled = TRUE
break
is ctrlscroll
@@ -719,15 +707,15 @@ def a2textmode(columns)
kswsave = *KSW
call($C300, 0, 0, 0, 0)
if MACHID & $C0 == MACHID_IIE
conio:clear = @a2clear80e
conio:gotoxy = @a2gotoxy80e
conio:textctrl = @a2ctrl80e
conio:clear = @a2clear80
conio:gotoxy = @a2gotoxy80e
conio:textctrl = @a2ctrl80e
else // MACHID_II
^$C059 // 80 column output softswitch
conio:clear = @a2clear80v
conio:gotoxy = @a2gotoxy80v
conio:textctrl = @a2ctrl80v
conio:putchars = @a2putchars
conio:clear = @a2clear80
conio:gotoxy = @a2gotoxy80v
conio:textctrl = @a2ctrl80v
conio:putchars = @a2putchars
fin
flags = flags | txt80
fin
@@ -736,19 +724,20 @@ def a2textmode(columns)
if MACHID & $C0 == MACHID_IIE
cout(21)
else // Videx disable
^$C058 // 40 column output softswitch
cout(26); cout('1')
*CSW = cswsave
*KSW = kswsave
a2viewport(0, 0, 40, 24)
^$C058 // 40 column output softswitch
//a2viewport(0, 0, 40, 24)
if flags & uppercase
conio:putchars = @a2putuprchars
fin
fin
fin
conio:clear = @a2clear
conio:gotoxy = @a2gotoxy
conio:textctrl = @a2ctrl
flags = flags & ~txt80
flags = flags & ~txt80
conio:clear = @a2clear
conio:gotoxy = @a2gotoxy
conio:textctrl = @a2ctrl
call($FB39, 0, 0, 0, 0) // textmode()
a2clear(cls)
fin
@@ -951,9 +940,6 @@ when MACHID & MACHID_MODEL
conio:rnd = @a13rnd
break
is MACHID_IIC
conio:getkey = @a2cgetkey
conio:putchars = @a2putchars
break
is MACHID_IIE
conio:getkey = @a2egetkey
conio:putchars = @a2putchars
+26 -24
View File
@@ -454,9 +454,9 @@ def drawstr(row, strptr)#0
fin
end
def drawgutterrow(row)#0
byte huns, tens, ones
byte seperator, huns, tens, ones
word scrnrow
char gutterchars[4]
char gutterchars[3]
//
// Draw line numbers and gutter hilites
@@ -466,19 +466,21 @@ def drawgutterrow(row)#0
huns, tens = divmod(scrnrow + 1, 100)
tens, ones = divmod(tens, 10)
if scrnrow < numlines
seperator = viewleft ?? '<' :: ' '
if flags & selection
if (scrnrow >= selrow and scrnrow <= cursrow) or (scrnrow >= cursrow and scrnrow <= selrow)
gutterchars[3] = '+'
seperator = '['
conio:textctrl(ctrlattr, INVERSE)
fin
elsif scrnrow == cursrow
fin
if scrnrow == cursrow
conio:textctrl(ctrlattr, INVERSE)
fin
huns, tens, ones = fillnum(huns, tens, ones, @gutterchars)
conio:gotoxy(0, row)
conio:putchars(3, @gutterchars)
conio:textctrl(ctrlattr, INVERSE)
putc(viewleft ?? '<' :: ' ')
putc(seperator)
conio:textctrl(ctrlattr, NORMAL)
fin
fin
@@ -486,7 +488,7 @@ end
def drawgutter#0
byte row, seperator, huns, tens, ones
word scrnrow
char gutterchars[4]
char gutterchars[3]
//
// Draw line numbers and gutter hilites
@@ -498,14 +500,14 @@ def drawgutter#0
for row = 0 to scrnheight-1
scrnrow = row + viewtop
if scrnrow < numlines
seperator = viewleft ?? '<' :: ' '
if flags & selection
if (scrnrow >= selrow and scrnrow <= cursrow) or (scrnrow >= cursrow and scrnrow <= selrow)
gutterchars[3] = '+'
seperator = '['
conio:textctrl(ctrlattr, INVERSE)
else
gutterchars[3] = viewleft ?? '<' :: ' '
fin
elsif scrnrow == cursrow
fin
if scrnrow == cursrow
conio:textctrl(ctrlattr, INVERSE)
fin
huns, tens, ones = fillnum(huns, tens, ones, @gutterchars)
@@ -521,12 +523,11 @@ end
def drawrows(toprow, bottomrow)#0
byte row, seperator, huns, tens, ones, numchars
word scrnrow, strptr
char gutterchars[4]
char gutterchars[3]
//
// Draw gutter and text
//
seperator = viewleft ?? '<' :: ' '
huns, tens = divmod(viewtop + toprow + 1, 100)
tens, ones = divmod(tens, 10)
for row = toprow to bottomrow
@@ -534,14 +535,14 @@ def drawrows(toprow, bottomrow)#0
if scrnrow < numlines
conio:gotoxy(0, row)
if flags & gutter
seperator = viewleft ?? '<' :: ' '
if flags & selection
if (scrnrow >= selrow and scrnrow <= cursrow) or (scrnrow >= cursrow and scrnrow <= selrow)
gutterchars[3] = '+'
seperator = '['
conio:textctrl(ctrlattr, INVERSE)
else
gutterchars[3] = viewleft ?? '<' :: ' '
fin
elsif scrnrow == cursrow
fin
if scrnrow == cursrow
conio:textctrl(ctrlattr, INVERSE)
fin
huns, tens, ones = fillnum(huns, tens, ones, @gutterchars)
@@ -1284,7 +1285,7 @@ def editmode#0
cursvpos(cursrow + 1)
drawscrn
break
is keyctrlt
is keyctrly
joinline
drawscrn
break
@@ -1306,17 +1307,15 @@ def editmode#0
autoindent(txtlinbuf=>[cursrow])
fin
break
is keyctrly
flags = flags ^ insmode
is keyctrlt
flags = flags ^ insmode
break
is keyescape
conio:textctrl(ctrlecho, ON)
conio:textctrl(ctrlcursor, ON)
cmdmode
if not (flags & exit)
conio:clear(cls)
conio:textctrl(ctrlecho, OFF)
conio:textctrl(ctrlcursor, OFF)
conio:clear(cls)
drawscrn
fin
wend
@@ -1408,6 +1407,8 @@ def cmdmode#0
var i, freepool
conio:clear(cls)
conio:textctrl(ctrlecho, ON)
conio:textctrl(ctrlcursor, ON)
puts("PLASMA Editor, Version 2.20\n")
while not (flags & exit)
puts(@filename)
@@ -1533,8 +1534,9 @@ if ^arg
cursrow = strtonum(arg)
fin
fin
cursflash = waitVBL
if cursflash == 0; cursflash = 300; fin
if waitVBL
cursflash = waitVBL
fin
flags = flags | insmode | gutter
scrnwidth = conio:textmode(scrnwidth)
inittxtbuf
+1
View File
@@ -3,6 +3,7 @@ include "inc/args.plh"
include "inc/fileio.plh"
include "inc/conio.plh"
include "inc/longjmp.plh"
sysflags restxt1|resxtxt1 // Reserve 80 column text pages
//
// Internal variables
//