OCY=CY : Inc CY : A=BL-BP-CX-(CY*16) : If A<1 Then CY=OCY
If CY>15 Then CY=15 : P_LINE_NEXT
P_BOB_XY
End Proc
Procedure P_CURS_LEFT
S=(Key Shift and 3) : If S>0 Then CF=1 : OCF=1 : Pop Proc
If CB=0 Then Pop Proc
Dec CX : If CX<0 Then CX=15 : Dec CY
If CY<0 Then CY=0 : P_LINE_PREVIOUS
P_BOB_XY
End Proc
Procedure P_CURS_RIGHT
S=(Key Shift and 3) : If S>0 Then CF=2 : OCF=2 : Pop Proc
OCX=CX : Inc CX : A=BL-BP-CX-(CY*16) : If A<1 Then CX=OCX
If CX>15 Then CX=0 : OCY=CY : Inc CY
A=BL-BP-CX-(CY*16) : If A<1 Then CY=OCY
If CY>15 Then CY=15 : P_LINE_NEXT
P_BOB_XY
End Proc
Procedure P_CURS_UP
If CB=0 Then Pop Proc
Dec CY : If CY<0 Then CY=0 : P_LINE_PREVIOUS
P_BOB_XY
End Proc
'
L_CONTROL_KEYS:
If SC=37 Then P_HELP
If BF<1 Then K$="" : SC=-1 : Goto L_LOOP
'
If SC=22 Then P_UNDO
If SC=32 Then P_AGAIN
If SC=35 Then P_FIRST
If SC=40 Then P_LAST
If SC=54 Then P_NEXT
K$="" : SC=-1
Goto L_LOOP
'
' ***** Menu Procedures *****
'
Procedure P_BLOCK
A=Free : If AGAIN=False Then M1=Choice(1) : M2=Choice(2)
If M2=12 Then Goto L_EXIT
If M2=8 Then P_BLOCK_INPUT : Goto L_EXIT
If M2=13 Then P_BLOCK_ZAP : Goto L_EXIT
If BF<1 Then EF=1 : P_ERROR : Goto L_EXIT
On M2 Proc P_BLOCK_ALL,P_BLOCKS,P_BLOCKE,P_BLOCK_OFF,P_BLOCK_FILL,P_BLOCK_APPEND,P_BLOCK_CUT,P_BLOCK_INPUT,P_BLOCK_INSERT,P_BLOCK_PASTE,P_BLOCK_STORE,P_NULL,P_BLOCK_ZAP
' This routine converts NUM$ to upper case and then does a search
' through it for various input data types.
'
NUM=0 : NUM$=Upper$(NUM$) : If Len(NUM$)=Len(NUM$-",") Then Goto L_LAST
L_J0:
ZP=Instr(NUM$,",") : If ZP=0 Then Goto L_LAST
ZL$=Left$(NUM$,ZP-1) : ZL=Len(NUM$) : If ZP=ZL Then NUM$=ZL$ : Goto L_LAST
NUM$=Right$(NUM$,ZL-ZP) : Gosub L_EVAL
Goto L_J0
'
L_LAST:
ZL$=NUM$ : Gosub L_EVAL
Goto L_EXIT
'
L_EVAL:
ZN=1 : If Left$(ZL$,1)="W" Then ZN=2 : ZL$=ZL$-"W"
If Left$(ZL$,1)="L" Then ZN=4 : ZL$=ZL$-"L"
ZV=Val(ZL$) : If ZN=1 Then Inc NUM : NUM(NUM)=ZV : Return
If ZN=2 Then ZL=(ZV and 255) : ZU=((ZV/256) and 255) : NUM(NUM+1)=ZU : NUM(NUM+2)=ZL : NUM=NUM+ZN : Return
If ZN=4 and ZV>0 Then Z3=(ZV and 255) : Z2=((ZV/256) and 255) : Z1=((ZV/65536) and 255) : Z0=((ZV/16777216) and 255) : NUM(NUM+1)=Z0 : NUM(NUM+2)=Z1 : NUM(NUM+3)=Z2 : NUM(NUM+4)=Z3 : NUM=NUM+ZN : Return
If ZN=4 and ZV<0 Then ZL$=Hex$(ZV,8)-"$" : NUM(NUM+4)=Val("$"+Right$(ZL$,2)) : NUM(NUM+3)=Val("$"+Mid$(ZL$,5,2)) : NUM(NUM+2)=Val("$"+Mid$(ZL$,3,2)) : NUM(NUM+1)=Val("$"+Left$(ZL$,2)) : NUM=NUM+ZN : Return
Bell : Return
L_EXIT:
End Proc
Procedure P_HELP
P_CLEAR_LIST
X Mouse=275 : Y Mouse=212 : PX=X Mouse : PY=Y Mouse : P_MOUSE_LOCK