diff --git a/Documentation.md b/Documentation.md
index e2e64e0..2af4abe 100644
--- a/Documentation.md
+++ b/Documentation.md
@@ -621,7 +621,7 @@ Erases the content area of the selected view. The frame is not touched.
Assembly | Applesoft |
---|
X: WGEraseViewContents
|
-&ERASE
+&ERASE(0)
|
@@ -633,7 +633,7 @@ Erases the content area and frame of the selected view.
Assembly | Applesoft |
---|
X: WGEraseView
|
-&WIPE
+&ERASE(1)
|
diff --git a/applesoft.s b/applesoft.s
index 4297895..11423a0 100644
--- a/applesoft.s
+++ b/applesoft.s
@@ -878,9 +878,22 @@ WGAmpersand_GOSUB:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGAmpersand_ERASE
-; Erases the contents of the selected view
-; &ERASE
+; Erases the contents of the selected view (with frame if 1)
+; &ERASE(0 or 1)
WGAmpersand_ERASE:
+ jsr WGAmpersandBeginArguments
+ jsr WGAmpersandIntArgument
+
+ pha
+ jsr WGAmpersandEndArguments
+
+ pla
+ beq WGAmpersand_ERASEcontents
+ jsr WGEraseView
+ jsr WGBottomCursor
+ rts
+
+WGAmpersand_ERASEcontents:
jsr WGEraseViewContents
jsr WGBottomCursor
rts
@@ -1097,16 +1110,6 @@ WGAmpersand_KILL:
rts
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; WGAmpersand_WIPE
-; Erases all of the selected view
-; &WIPE
-WGAmpersand_WIPE:
- jsr WGEraseView
- jsr WGBottomCursor
- rts
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGAmpersand_EXIT
; Shuts down WeeGUI
@@ -1141,6 +1144,30 @@ WGBottomCursor:
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; WGAmpersand_GTSEL
+; Returns ID of selected view
+; >SEL(A%)
+
+WGAmpersand_GTSEL:
+ jsr WGAmpersandBeginArguments
+
+ jsr PTRGET
+
+ lda WG_ACTIVEVIEW
+ pha
+
+ ldy #0
+ lda #0
+ sta (VARPNT),y
+ iny
+ pla
+ sta (VARPNT),y
+
+ jsr WGAmpersandEndArguments
+ rts
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGGosub
; Performs an Applesoft GOSUB to a line number
@@ -1297,9 +1324,6 @@ WGAmpersandCommandTable:
.byte "KILL",0,0
.addr WGAmpersand_KILL
-.byte "WIPE",0,0
-.addr WGAmpersand_WIPE
-
.byte "EXIT",0,0
.addr WGAmpersand_EXIT
@@ -1312,6 +1336,9 @@ WGAmpersandCommandTable:
.byte "STRW",0,0
.addr WGAmpersand_STRW
+.byte "GTSEL",0
+.addr WGAmpersand_GTSEL
+
;.byte TOKEN_GOSUB,0,0,0,0,0,0,0,0,0,0,0,0,0 ; For internal testing of the procedural gosub
;.addr WGAmpersand_GOSUB
diff --git a/weegui.dsk b/weegui.dsk
index de2c741..b4221e2 100644
Binary files a/weegui.dsk and b/weegui.dsk differ
diff --git a/weegui.s b/weegui.s
index ce45109..40d7dfb 100644
--- a/weegui.s
+++ b/weegui.s
@@ -110,9 +110,9 @@ WGInit:
; tsb MEMBITMAP + $12
; Protect us from Applesoft by setting up HIMEM
-; lda #$77 ; 7800 (really 77ff)
+; lda #$78 ; 7800 (really 77ff)
; sta LINNUMH
-; lda #$ff
+; lda #$00
; sta LINNUML
; jsr SETHI