'----------------------------------------------------------------------------------------------------------Û SETUP Û----------------------------------------------------------------------------------------------------------
CONST ScreenWidth
= 1024 ' ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ CONST ScreenHeight
= 768 ' ³ ³ 1y,1x ³ ' ³ video ³ TEXT ³
'----------------------------------------------------------------------------------------------------------Û VARIABLES Û----------------------------------------------------------------------------------------------------------
DIM SHARED segmentState%
(34) ' is segment NOMINAL(1) or ERROR(0)? ¿ DIM SHARED actualSegmentWorking%
' where are we? ³ SEGMENTS DIM SHARED segmentName$
(34) ' names of the segments Ù
' ³
' nodeV21(segment, node).type ³
' ³
DIM SHARED actualNodeWorking%
' where are we?³ ' Ù
' inst$(segment, node, instruction) ³ INSTRUCTIONS
DIM SHARED menuHighlight%
' <----------------- MAIN MENU only DIM SHARED blink%
' <--------------------blinking CURSOR '---------------------------------------------------------------------------------------------------------Û PRE-PROGRAM Û----------------------------------------------------------------------------------------------------------
segmentState%(i%) = 0 ' ³ SEGMENTS
segmentState%(34) = -1 ' SANDBOX
CASE 0 TO 3: nodeV21
(i%
, j%
).y
= 4 ' ³ CASE 4 TO 7: nodeV21
(i%
, j%
).y
= 19 ' ³ CASE 8 TO 11: nodeV21
(i%
, j%
).y
= 34 ' ³ CASE 0, 4, 8: nodeV21
(i%
, j%
).x
= 31 ' ³ CASE 1, 5, 9: nodeV21
(i%
, j%
).x
= 56 ' ³ CASE 2, 6, 10: nodeV21
(i%
, j%
).x
= 81 ' ³ CASE 3, 7, 11: nodeV21
(i%
, j%
).x
= 106 '³
nodeV21(i%, j%).acc = 0 ' ³
nodeV21(i%, j%).bak = 0 ' ³ NODES
nodeV21(i%, j%).mode = "IDLE" ' ³ registers
nodeV21(i%, j%).last = "NONE" ' ³
FOR i%
= 0 TO 34 ' setear las instrucciones a null ¿ inst$(i%, j%, k%) = "" ' ³ INSTRUCTIONS
'infect ¿
'CLS _AUTODISPLAY ³
'systemCheck ³
' ³
segmentName$(0) = "SYSTEM CLOCK" ' ³
segmentName$(1) = "MULTIPLEXER" ' ³ INITIALIZE (at least for testing)
segmentName$(34) = "SANDBOX" ' ³
' ³
menuHighlight% = 0 ' segment 1 is index 0 on the array ³
actualSegmentWorking% = -1 ' main menu is -1 ³
actualNodeWorking% = -1 ' on main menu no node is being operated Ù
actualLineWorking% = -1
IDEcomplains% = 0
'---------------------------------------------------------------------------------------------------------Û PROGRAM Û----------------------------------------------------------------------------------------------------------
mainMenu
'---------------------------------------------------------------------------------------------------------Û SUBROUTINES Û----------------------------------------------------------------------------------------------------------
SUB mainMenu
() ' draws main menu and instructions on the bottom
CASE -2: drawSegments: UsureToLeave
IF actualSegmentWorking%
= -1 THEN ' ¿ IF KeyPress$
= CHR$(0) + CHR$(77) AND menuHighlight%
<> 34 THEN menuHighlight%
= menuHighlight%
+ 1 ' ¿ ³ IF KeyPress$
= CHR$(0) + CHR$(75) AND menuHighlight%
<> 0 THEN menuHighlight%
= menuHighlight%
- 1 ' ³ ARROWS for ³ only works IF KeyPress$
= CHR$(0) + CHR$(80) AND menuHighlight%
< 28 THEN menuHighlight%
= menuHighlight%
+ 7 ' ³ navigation ³ in the IF KeyPress$
= CHR$(0) + CHR$(72) AND menuHighlight%
> 6 THEN menuHighlight%
= menuHighlight%
- 7 ' Ù ³ main menu IF KeyPress$
= CHR$(13) THEN actualSegmentWorking%
= menuHighlight%
' ENTER to select ³
IF KeyPress$
= CHR$(0) + CHR$(68) THEN actualSegmentWorking%
= -2 ' F10 to ask for leaving
' ³ to leave
IF KeyPress$
= "n" AND actualSegmentWorking%
= -2 THEN actualSegmentWorking%
= -1 ' N ¿ NO ³ IF KeyPress$
= CHR$(27) THEN actualSegmentWorking%
= -1 '-------------------------ESC Ù Ù
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
drawASCIIbox 20, 46, 34, 2, " Are you sure you wan't to leave? ", 3
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LOCATE nodeV21
(actualSegmentWorking%
, i%
).y
+ ii%
+ 1, nodeV21
(actualSegmentWorking%
, i%
).x
+ 1 PRINT inst$
(actualSegmentWorking%
, i%
, ii%
)
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB IDE
() ' checks the instructions spelling and warns if incorrect
FOR i%
= 0 TO 11 ' for all the nodes FOR j%
= 0 TO 10 ' for all the instructions
analyzing$
= _TRIM$(inst$
(actualSegmentWorking%
, i%
, j%
))
IF LEN(analyzing$
) THEN ' cases that are not null opCode$
= LEFT$(analyzing$
, 3) IDEcomplains% = -1
IDEcomplains% = 0
drawASCIIbox 46, 2, 27, 1, " INVALID OPCODE", 2
' - INSTRUCTION SET QUICK REFERENCE -
'
'NOP NO OPERATION
'MOV <DST>, <SRC> MOVE <SRC> TO <DST>
'SWP SWAP ACC AND BAK
'SAV SAVE ACC TO BAK
'ADD <SRC> ADD <SRC> TO ACC
'SUB <SRC> SUBSTRACT <SRC> FROM ACC
'NEG NEGATE ACC
'JMP <LABEL> JUMP TO <LABEL>
'JEZ <LABEL> JUMP TO <LABEL> IF ACC = 0
'JNZ <LABEL> JUMP TO <LABEL> IF ACC != 0
'JGZ <LABEL> JUMP TO <LABEL> IF ACC > 0
'JLZ <LABEL> JUMP TO <LABEL> IF ACC < 0
'JRO <SRC> JUMP TO RELATIVE OFFSET <SRC>
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB sandBox
() ' subroutines for each segment has the name as the user sees it (practical purposes)
actualNodeWorking% = 0
actualLineWorking% = 0
drawInsideSegment 1, 1
displayInstructions
textProccesor keyPress$
IDE
actualSegmentWorking% = -1
actualNodeWorking% = -1
actualLineWorking% = -1
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB inSegment_1
() ' subroutines for each segment has the name as the user sees it (practical purposes)
actualNodeWorking% = 0
actualLineWorking% = 0
drawInsideSegment 1, 1
displayInstructions
textProccesor keyPress$
actualSegmentWorking% = -1
actualNodeWorking% = -1
actualLineWorking% = -1
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB inSegment_2
() ' subroutines for each segment has the name as the user sees it (practical purposes)
drawInsideSegment 2, 1
actualSegmentWorking% = -1
actualNodeWorking% = -1
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB drawInsideSegment
(ins%
, outs%
) ' when you get inside a segment you see this (pass in the number of inputs and outputs)
IF ins%
> 3 THEN EXIT SUB ' ¿ Ú REM if only 1 output, you can have up to 3 inputs IF outs%
< 1 THEN EXIT SUB ' ³ check if logic ³ for 2 outputs only 1 input... video thing really,
PRINT "- SEGMENT ";
LTRIM$(STR$(actualSegmentWorking%
+ 1));
" -";
' ³ segment name LOCATE 3, 9 ' ³ °°°°°°°°°°°°°°°°°°°°°°°°°°°°° 'PRINT "- "; segmentName$(actualSegmentWorking%); " -" ' ------------Ù---------------- ° UNCOMMENT AFTER TESTINGS °
' °°°°°°°°°°°°°°°°°°°°°°°°°°°°°
drawASCIIbox 4, 2, 25, 6, "", 2 'draw the instructions box
drawNodeV21 nY%, nX% ' ³ corresponding
IF NOT actualSegmentWorking%
= 34 THEN ' <------ NOT the SANDBOX
ii% = 2 ' ¿ ³
FOR i%
= 1 TO ins%
' ³ print as many ³ LOCATE 13, ii%
+ 1 ' ³ ASCII boxes as ³ PRINT "IN.";
CHR$(96 + i%
);
' ³ inputs needed and ³ drawASCIIbox 14, ii%, 4, 25, "", 2 '³ a title "IN" + ³
ii% = ii% + 5 ' ³ a, b, c, d... ³
' ³
ii% = 7 ' ³ ³ INPUTS
FOR i%
= 1 TO ins%
- 1 ' ³ correct ³ table ii% = ii% + 5 ' ³ ³
PRINT "OUT.x";
' ³ rightmost ³ drawASCIIbox 14, 23, 4, 25, "", 2 ' ³ ³
drawASCIIbox 14, 18, 4, 25, "", 2 ' Ù ³
' ³
LOCATE 40, 23 ' ³ for rightmost ³ ' ³
IF outs%
= 2 THEN ' only if asked for ³ PRINT "OUT.x";
'³ "OUT.y" overprinted ³ LOCATE 13, 21 ' ³ rightmost "OUT.x" ³ OUTPUTS PRINT "OUT.y";
'Ù ³ table drawASCIIbox 14, 13, 4, 25, "", 2 ' ³
drawASCIIbox 14, 8, 4, 25, "", 2 ' ³
' ³
drawASCIIbox 12, 4, 7, 1, "CONSOLE", 2 ' ³
drawASCIIbox 14, 4, 7, 23, "", 2 ' ³
drawASCIIbox 38, 4, 7, 1, ">", 2 ' ³
LOCATE k%
+ 2, j%
+ 1 ' ³ PORTS ³ ' ³ NODES
' ³
IF actualSegmentWorking%
= 34 THEN ' ¿ ³ ' ³ ports
PRINT "CNS.x";
CHR$(25);
' <---------SANDBOX ³
drawASCIIbox
41, 4, 2, 1, (CHR$(16) + CHR$(16)), 1 ' ¿ drawASCIIbox
41, 14, 2, 1, (CHR$(124) + CHR$(16)), 1 ' ³ drawASCIIbox
41, 24, 2, 1, (CHR$(219) + CHR$(219)), 1 ' ³ PRINT "ESC to go back";
' Ù
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
blink% = blink% - 16 ' ¿
IF blink%
< 0 THEN blink%
= 255 ' ³ LOCATE nodeV21
(actualSegmentWorking%
, actualNodeWorking%
).y
+ actualLineWorking%
+ 1,_
nodeV21
(actualSegmentWorking%
, actualNodeWorking%
).x
+ LEN(inst$
(actualSegmentWorking%
, actualNodeWorking%
, actualLineWorking%
)) + 1'³
IF LEN(inst$
(actualSegmentWorking%
, actualNodeWorking%
, actualLineWorking%
)) < 13 THEN ' ¿ PRINTABLE inst$(actualSegmentWorking%, actualNodeWorking%, actualLineWorking%) =_
inst$
(actualSegmentWorking%
, actualNodeWorking%
, actualLineWorking%
) + key$
' ³ can't write more than
inst$(actualSegmentWorking%, actualNodeWorking%, actualLineWorking%) =_
LEFT$(inst$
(actualSegmentWorking%
, actualNodeWorking%
, actualLineWorking%
),_
LEN(inst$
(actualSegmentWorking%
, actualNodeWorking%
, actualLineWorking%
)) - 1) ' ³
IF ASC(key$
) = 13 AND actualLineWorking%
< 10 AND inst$
(actualSegmentWorking%
, actualNodeWorking%
, 10) = "" THEN '¿ actualLineWorking% = actualLineWorking% + 1 ' ³ ENTER
IF actualNodeWorking%
< 11 THEN ' ³ actualNodeWorking% = actualNodeWorking% + 1 ' ³
actualNodeWorking% = 0 ' ³
actualLineWorking% = 0 ' ³
END IF ' B+ avoid null ; -) U2pro bro
actualLineWorking% = actualLineWorking% - 1 ' ³
actualLineWorking% = actualLineWorking% + 1 ' ³
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB infect
() ' virus intro sketch... base under attack!
row% = 20
column% = 52
message1$ = "I'm taking control..."
message2$ = "And you can't stop me"
'sayHello
PRINTslowly row% + 3, column% + 2, message1$, 1 '³ psychopatiate
PRINTslowly row% + 4, column% + 2, message2$, 1 'Ù the user
'install
i% = 0
ii% = 0
i% = i% + 1
LOCATE RND(1) * 47 + 1, RND(1) * 127 + 1 ' ³ random characthers on the back
COLOR GREEN
' a virus is GREEN! ¿ ' ³ draw box and
drawASCIIbox row%, column%, 23, 7, "", 2 '³ CLS inside it
' ³ (don't erease back)
fakeCLS row% + 1, column% + 1, 22, 6 ' Ù
LOCATE row%
+ 1, column%
+ 2 ' ³ blink: title PRINT "CV64 VIRUS V0.2 >:-[";
' ³ underline LOCATE row%
+ 2, column%
+ 2 ' ³ message1$ ' ³ message2$
LOCATE row%
+ 3, column%
+ 2 ' ³ ' ³
LOCATE row%
+ 4, column%
+ 2 ' ³
LOCATE row%
+ 6, column%
+ 2 ' ¿ IF ii%
< 40 AND ii%
> 19 THEN PRINT "Accesing files...";
' ³ loading messages
LOCATE row%
+ 6, column%
+ 22 - LEN(ii$
) ' ³ xx%
LOCATE row%
+ 7, column%
+ 2 ' ³ loading bar SLEEP 2 ' infection complete XD
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB systemCheck
() ' fake system check as excuse to go at main menu
PRINTslowly 2, 2, "Unexpected restart. Running system check...", 1
PRINTslowly 6, 2, "Nodes have been corrupted...", 1
PRINTslowly 8, 2, "Reprogram them to recover access to OS...", 1
PRINTslowly 10, 2, "Please, don't shut down the equipment until reprogramming is over", 1
PRINTslowly 11, 2, "or all system data won't be able to recover...", 0
PRINTslowly 13, 2, "Starting debbuger", 1
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB drawSegments
() ' draw the segment on the main menu
i% = -1
i% = i% + 1 ' node index number, start -1 to make it 0 here for the array
' we add another +1 later to make em look like start at 1
FOR xx%
= 1 TO 11 ' ³ if node is broke LOCATE y%
+ yy%
, x%
+ xx%
' ³ random characters
IF i%
> 8 THEN ' ¿ the shown number segmentNumber$
= LTRIM$(STR$(i%
+ 1)) ' ³ of the segment, segmentNumber$
= " " + LTRIM$(STR$(i%
+ 1)) ' ³ spaces if
IF menuHighlight%
= i%
THEN ' ¿ COLOR WHITE
' ³ show WHITE if COLOR MIDGRAY
' ³ is MIDGRAY
drawASCIIbox y%, x%, 11, 5, " SEGMENT" + segmentNumber$, 1 ' draw the box
LOCATE 40, 113:
PRINT " SANDBOX ";
' <---------------SANDBOX CASE (overprinted over SEGMENT 35)
IF segmentState%
(i%
) THEN ' ³ accordingly to COLOR MIDGRAY
, GREEN
' ³ segmentState%() PRINT "-NOMINAL-" ' ³ draw -NOMINAL-
COLOR , BLACK
' don't conflictuate other stuff
drawMainInstructions
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB drawMainInstructions
() ' draws a single blue line with some instruction on it at the bottom of the screen
LOCATE 48, ii%
' ³ blue background PRINT " ";
' ³ line at bottom
PRINT "ARROWS Navigate";
' ³ the main menu PRINT "ENTER Select";
' ³ PRINT "F10 Save and Exit";
'Ù
COLOR , BLACK
' don't conflictuate with other things
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB drawNodeV21
(nodeY%
, nodeX%
)
LOCATE nodeV21
(actualSegmentWorking%
, i%
).y
+ 2, nodeV21
(actualSegmentWorking%
, i%
).x
+ 16 ' ³ PRINT nodeV21
(actualSegmentWorking%
, i%
).acc;
' ³ show LOCATE nodeV21
(actualSegmentWorking%
, i%
).y
+ 5, nodeV21
(actualSegmentWorking%
, i%
).x
+ 16 ' ³ information PRINT nodeV21
(actualSegmentWorking%
, i%
).bak;
' ³ of node LOCATE nodeV21
(actualSegmentWorking%
, i%
).y
+ 8, nodeV21
(actualSegmentWorking%
, i%
).x
+ 16 ' ³ registers PRINT nodeV21
(actualSegmentWorking%
, i%
).mode;
' ³ (acc, bak, LOCATE nodeV21
(actualSegmentWorking%
, i%
).y
+ 11, nodeV21
(actualSegmentWorking%
, i%
).x
+ 16 '³ mode, last) PRINT nodeV21
(actualSegmentWorking%
, i%
).last;
' ³
drawASCIIbox nodeY%, nodeX%, 14, 11, "", 1 ' user input instructions box
drawASCIIbox nodeY%, nodeX% + 15, 4, 2, "ACC", 1 ' ¿
drawASCIIbox nodeY% + 3, nodeX% + 15, 4, 2, "BAK", 1 ' ³ box over
drawASCIIbox nodeY% + 6, nodeX% + 15, 4, 2, "MODE", 1 '³ box
drawASCIIbox nodeY% + 9, nodeX% + 15, 4, 2, "LAST", 1 'Ù
LOCATE nodeY%
, nodeX%
+ 15 ' ¿ LOCATE nodeY%
+ 12, nodeX%
+ 15 ' ³ ' ³ then correct
LOCATE nodeY%
+ i%
, nodeX%
+ 15 ' ³ nedded ' ³ deciving)
LOCATE nodeY%
+ i%
, nodeX%
+ 20 ' ³
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB PRINTslowly
(originY%
, originX%
, message$
, preBlink%
)
IF preBlink%
= 1 THEN PCthinking originY%
, originX%
' wanna see some blinking before start writing?
i% = 0 ' Ä¿
i% = i% + 1 ' ³ print message$
buildingMessage$
= LEFT$(message$
, i%
) + CHR$(219) ' ³ character by character LOCATE originY%
, originX%
' ³ and erease the cursor PRINT buildingMessage$;
' ³
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB PCthinking
(originY%
, originX%
)
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB fakeCLS
(originY%
, originX%
, width%
, height%
)
FOR y%
= 0 TO height%
' ³ print LOCATE originY%
+ y%
, originX%
+ x%
' ³ " " (space) PRINT " ";
' ³ repeatedly
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUB drawASCIIbox
(originY%
, originX%
, width%
, height%
, message$
, style%
)
LOCATE originY%
, originX%
' ÄÄÄ¿ ' ³
LOCATE originY%
+ height%
+ 1, originX%
' ³ ' ³
LOCATE originY%
, originX%
+ width%
+ 1 ' ³ ' ³
LOCATE originY%
+ height%
+ 1, originX%
+ width%
+ 1 ' ³
IF style%
= 1 THEN char%
= 179 ' ³ ÄÄÄ¿ IF style%
= 2 THEN char%
= 186 ' º determinate style ³ IF style%
= 3 THEN char%
= 219 ' Û ³ FOR y%
= 1 TO height%
' ³ LOCATE originY%
+ y%
, originX%
' locate and print ³ sides LOCATE originY%
+ y%
, originX%
+ width%
+ 1 ' ³
IF style%
< 3 THEN ' styles 1 and 2 ÄÄÄ¿ IF style%
= 1 THEN char%
= 196 ' Ä ³ IF style%
= 2 THEN char%
= 205 ' Í ³ LOCATE originY%
, originX%
+ x%
' ³ LOCATE originY%
+ height%
+ 1, originX%
+ x%
' ³ ELSE ' special case of style 3 ³ char1% = 220 ' Ü ³
char2% = 223 ' ß ³
FOR x%
= 0 TO width%
+ 1 ' ³ LOCATE originY%
, originX%
+ x%
' ³ LOCATE originY%
+ height%
+ 1, originX%
+ x%
' ³
LOCATE originY%
+ 1, originX%
+ 1 ' ÄÄÄ¿ message