\ \ HTURTLE.F \ Turtle graphics package for hForth \ Words names are in Korean. \ \ HTURTLE.EXEe HF86EXE.EXEi be ҁ aq ᝡ ͡a aii a \ ee a. \ \ << OPTIONAL.F \ << ASM8086.F \ << COREEXT.F \ << MSDOS.F \ BL PARSE MULTI.F INCLUDED \ BL PARSE HIOMULT2.F INCLUDED \ BL PARSE HTURTLE.F INCLUDED \ SAVE-SYSTEM-AS HTURTLE.EXE \ \ 1996. 2. 21. \ Wonyong Koh BASE @ GET-ORDER GET-CURRENT ei‰b-WORDLIST GET-ORDER 1 + SET-ORDER MARKER ~TURTLE DECIMAL CREATE sin16384 0 , 286 , 572 , 857 , 1143 , 1428 , 1713 , 1997 , 2280 , 2563 , 2845 , 3126 , 3406 , 3686 , 3964 , 4240 , 4516 , 4790 , 5063 , 5334 , 5604 , 5872 , 6138 , 6402 , 6664 , 6924 , 7182 , 7438 , 7692 , 7943 , 8192 , 8438 , 8682 , 8923 , 9162 , 9397 , 9630 , 9860 , 10087 , 10311 , 10531 , 10749 , 10963 , 11174 , 11381 , 11585 , 11786 , 11982 , 12176 , 12365 , 12551 , 12733 , 12911 , 13085 , 13255 , 13421 , 13583 , 13741 , 13894 , 14044 , 14189 , 14330 , 14466 , 14598 , 14726 , 14849 , 14968 , 15082 , 15191 , 15296 , 15396 , 15491 , 15582 , 15668 , 15749 , 15826 , 15897 , 15964 , 16026 , 16083 , 16135 , 16182 , 16225 , 16262 , 16294 , 16322 , 16344 , 16362 , 16374 , 16382 , 16384 , 16382 , 16374 , 16362 , 16344 , 16322 , 16294 , 16262 , 16225 , 16182 , 16135 , 16083 , 16026 , 15964 , 15897 , 15826 , 15749 , 15668 , 15582 , 15491 , 15396 , 15296 , 15191 , 15082 , 14968 , 14849 , 14726 , 14598 , 14466 , 14330 , 14189 , 14044 , 13894 , 13741 , 13583 , 13421 , 13255 , 13085 , 12911 , 12733 , 12551 , 12365 , 12176 , 11982 , 11786 , 11585 , 11381 , 11174 , 10963 , 10749 , 10531 , 10311 , 10087 , 9860 , 9630 , 9397 , 9162 , 8923 , 8682 , 8438 , 8192 , 7943 , 7692 , 7438 , 7182 , 6924 , 6664 , 6402 , 6138 , 5872 , 5604 , 5334 , 5063 , 4790 , 4516 , 4240 , 3964 , 3686 , 3406 , 3126 , 2845 , 2563 , 2280 , 1997 , 1713 , 1428 , 1143 , 857 , 572 , 286 , 0 , -286 , -572 , -857 , -1143 , -1428 , -1713 , -1997 , -2280 , -2563 , -2845 , -3126 , -3406 , -3686 , -3964 , -4240 , -4516 , -4790 , -5063 , -5334 , -5604 , -5872 , -6138 , -6402 , -6664 , -6924 , -7182 , -7438 , -7692 , -7943 , -8192 , -8438 , -8682 , -8923 , -9162 , -9397 , -9630 , -9860 , -10087 , -10311 , -10531 , -10749 , -10963 , -11174 , -11381 , -11585 , -11786 , -11982 , -12176 , -12365 , -12551 , -12733 , -12911 , -13085 , -13255 , -13421 , -13583 , -13741 , -13894 , -14044 , -14189 , -14330 , -14466 , -14598 , -14726 , -14849 , -14968 , -15082 , -15191 , -15296 , -15396 , -15491 , -15582 , -15668 , -15749 , -15826 , -15897 , -15964 , -16026 , -16083 , -16135 , -16182 , -16225 , -16262 , -16294 , -16322 , -16344 , -16362 , -16374 , -16382 , -16384 , -16382 , -16374 , -16362 , -16344 , -16322 , -16294 , -16262 , -16225 , -16182 , -16135 , -16083 , -16026 , -15964 , -15897 , -15826 , -15749 , -15668 , -15582 , -15491 , -15396 , -15296 , -15191 , -15082 , -14968 , -14849 , -14726 , -14598 , -14466 , -14330 , -14189 , -14044 , -13894 , -13741 , -13583 , -13421 , -13255 , -13085 , -12911 , -12733 , -12551 , -12365 , -12176 , -11982 , -11786 , -11585 , -11381 , -11174 , -10963 , -10749 , -10531 , -10311 , -10087 , -9860 , -9630 , -9397 , -9162 , -8923 , -8682 , -8438 , -8192 , -7943 , -7692 , -7438 , -7182 , -6924 , -6664 , -6402 , -6138 , -5872 , -5604 , -5334 , -5063 , -4790 , -4516 , -4240 , -3964 , -3686 , -3406 , -3126 , -2845 , -2563 , -2280 , -1997 , -1713 , -1428 , -1143 , -857 , -572 , -286 , -0 , 286 , 572 , 857 , 1143 , 1428 , 1713 , 1997 , 2280 , 2563 , 2845 , 3126 , 3406 , 3686 , 3964 , 4240 , 4516 , 4790 , 5063 , 5334 , 5604 , 5872 , 6138 , 6402 , 6664 , 6924 , 7182 , 7438 , 7692 , 7943 , 8192 , 8438 , 8682 , 8923 , 9162 , 9397 , 9630 , 9860 , 10087 , 10311 , 10531 , 10749 , 10963 , 11174 , 11381 , 11585 , 11786 , 11982 , 12176 , 12365 , 12551 , 12733 , 12911 , 13085 , 13255 , 13421 , 13583 , 13741 , 13894 , 14044 , 14189 , 14330 , 14466 , 14598 , 14726 , 14849 , 14968 , 15082 , 15191 , 15296 , 15396 , 15491 , 15582 , 15668 , 15749 , 15826 , 15897 , 15964 , 16026 , 16083 , 16135 , 16182 , 16225 , 16262 , 16294 , 16322 , 16344 , 16362 , 16374 , 16382 , 16384 , 16382 , 16374 , 16362 , 16344 , 16322 , 16294 , 16262 , 16225 , 16182 , 16135 , 16083 , 16026 , 15964 , 15897 , 15826 , 15749 , 15668 , 15582 , 15491 , 15396 , 15296 , 15191 , 15082 , 14968 , 14849 , 14726 , 14598 , 14466 , 14330 , 14189 , 14044 , 13894 , 13741 , 13583 , 13421 , 13255 , 13085 , 12911 , 12733 , 12551 , 12365 , 12176 , 11982 , 11786 , 11585 , 11381 , 11174 , 10963 , 10749 , 10531 , 10311 , 10087 , 9860 , 9630 , 9397 , 9162 , 8923 , 8682 , 8438 , 8192 , 7943 , 7692 , 7438 , 7182 , 6924 , 6664 , 6402 , 6138 , 5872 , 5604 , 5334 , 5063 , 4790 , 4516 , 4240 , 3964 , 3686 , 3406 , 3126 , 2845 , 2563 , 2280 , 1997 , 1713 , 1428 , 1143 , 857 , 572 , 286 , 0 , -286 , -572 , -857 , -1143 , -1428 , -1713 , -1997 , -2280 , -2563 , -2845 , -3126 , -3406 , -3686 , -3964 , -4240 , -4516 , -4790 , -5063 , -5334 , -5604 , -5872 , -6138 , -6402 , -6664 , -6924 , -7182 , -7438 , -7692 , -7943 , -8192 , -8438 , -8682 , -8923 , -9162 , -9397 , -9630 , -9860 , -10087 , -10311 , -10531 , -10749 , -10963 , -11174 , -11381 , -11585 , -11786 , -11982 , -12176 , -12365 , -12551 , -12733 , -12911 , -13085 , -13255 , -13421 , -13583 , -13741 , -13894 , -14044 , -14189 , -14330 , -14466 , -14598 , -14726 , -14849 , -14968 , -15082 , -15191 , -15296 , -15396 , -15491 , -15582 , -15668 , -15749 , -15826 , -15897 , -15964 , -16026 , -16083 , -16135 , -16182 , -16225 , -16262 , -16294 , -16322 , -16344 , -16362 , -16374 , -16382 , -16384 , -16382 , -16374 , -16362 , -16344 , -16322 , -16294 , -16262 , -16225 , -16182 , -16135 , -16083 , -16026 , -15964 , -15897 , -15826 , -15749 , -15668 , -15582 , -15491 , -15396 , -15296 , -15191 , -15082 , -14968 , -14849 , -14726 , -14598 , -14466 , -14330 , -14189 , -14044 , -13894 , -13741 , -13583 , -13421 , -13255 , -13085 , -12911 , -12733 , -12551 , -12365 , -12176 , -11982 , -11786 , -11585 , -11381 , -11174 , -10963 , -10749 , -10531 , -10311 , -10087 , -9860 , -9630 , -9397 , -9162 , -8923 , -8682 , -8438 , -8192 , -7943 , -7692 , -7438 , -7182 , -6924 , -6664 , -6402 , -6138 , -5872 , -5604 , -5334 , -5063 , -4790 , -4516 , -4240 , -3964 , -3686 , -3406 , -3126 , -2845 , -2563 , -2280 , -1997 , -1713 , -1428 , -1143 , -857 , -572 , -286 , -0 , 286 , 572 , 857 , 1143 , 1428 , 1713 , 1997 , 2280 , 2563 , 2845 , 3126 , 3406 , 3686 , 3964 , 4240 , 4516 , 4790 , 5063 , 5334 , 5604 , 5872 , 6138 , 6402 , 6664 , 6924 , 7182 , 7438 , 7692 , 7943 , 8192 , 8438 , 8682 , 8923 , 9162 , 9397 , 9630 , 9860 , 10087 , 10311 , 10531 , 10749 , 10963 , 11174 , 11381 , 11585 , 11786 , 11982 , 12176 , 12365 , 12551 , 12733 , 12911 , 13085 , 13255 , 13421 , 13583 , 13741 , 13894 , 14044 , 14189 , 14330 , 14466 , 14598 , 14726 , 14849 , 14968 , 15082 , 15191 , 15296 , 15396 , 15491 , 15582 , 15668 , 15749 , 15826 , 15897 , 15964 , 16026 , 16083 , 16135 , 16182 , 16225 , 16262 , 16294 , 16322 , 16344 , 16362 , 16374 , 16382 , HEX \ : PLOT ( x y -- ) \ Y>SEG SWAP 8 /MOD SWAP >R \ seg_addr x/8 R: x_mod_8 \ 2DUP LC@ R> CHARS XMASK + C@ OR ROT ROT LC! ; CODE PLOT ( x y -- ) BX 1 SHL, Y>SegTable ) BX ADD, 0 [BX] ES MOV, BX POP, BX CX MOV, BX 1 SHR, BX 1 SHR, BX 1 SHR, ES: 0 [BX] AL MOV, 1 # AH MOV, CL NOT, 7 # CL AND, AH CL ROL, AH AL OR, ES: AL 0 [BX] MOV, BX POP, NEXT, END-CODE \ : 2ROT \ >R >R 2SWAP R> R> 2SWAP ; \ \ : LINE ( x1 y1 x2 y2--) \ 2OVER 2OVER ROT - ABS >R - ABS R> MAX 2 < \ IF 2DROP PLOT EXIT THEN \ 2OVER 2OVER ROT + 1+ 2/ >R + 1+ 2/ R> \ 2DUP 2ROT RECURSE RECURSE ; VARIABLE Delta VARIABLE Delta/2 \ y changing faster than x CODE steep640 \ on entry, ax = delta x, bx = delta y, cx=x1, dx=y1 BX BP MOV, \ for counter BX 1 SHR, BX Delta/2 ) MOV, \ halfy BX BX XOR, \ clear for cmp 6 L: BX PUSH, CX PUSH, \ x DX BX MOV, BX 1 SHL, Y>SegTable ) BX ADD, 0 [BX] ES MOV, CX BX MOV, BX 1 SHR, BX 1 SHR, BX 1 SHR, ES: 0 [BX] AL MOV, 1 # AH MOV, CL NOT, 7 # CL AND, AH CL ROL, AH AL OR, ES: AL 0 [BX] MOV, CX POP, BX POP, DX INC, \ y is always increasing MAX-Y 16* # DX CMP, 8 L# JL, DX DX XOR, 8 L: Delta ) BX ADD, \ = bx + delta_y Delta/2 ) BX CMP, \ bx > halfy ? 7 L# JLE, SI BX SUB, \ bx - delta_y DI CX ADD, \ inc or dec x MAX-X 8 * # CX SUB, 7 L# JNS, MAX-X 8 * # CX ADD, 7 L# JNS, MAX-X 8 * # CX ADD, 7 L: BP DEC, 6 L# JGE, BP POP, SI POP, BX POP, NEXT, END-CODE \ on exit, cx=x1, dx=y1, ax=x2, bx=y2 CODE line640 ( x1 y1 x2 y2 -- ) \ writes to screen directly AX POP, DX POP, CX POP, SI PUSH, ( used to hold direction) BP PUSH, ( used as counter) \ see if we'll inc or dec x, y (draws in any direction) DX BX SUB, \ bx <- y2-y1 (delta y) 2 L# JGE, BX DX ADD, \ dx <- y2 BX NEG, \ abs(delta y) CX AX XCHG, 2 L: BX SI MOV, \ delta_y(BX) to SI CX AX SUB, \ x2 - x1 = delta_x 1 # DI MOV, \ di to increment x 4 L# JGE, -1 # DI MOV, \ di to decrement x AX NEG, \ abs(delta x) 4 L: \ adjust x1(CX), y1(DX) in proper range AX PUSH, DX PUSH, CX AX MOV, CWD, MAX-X 8 * # BP MOV, BP IDIV, DX DX OR, 1 L# JNS, BP DX ADD, 1 L: DX CX MOV, DX POP, DX AX MOV, CWD, MAX-Y 16* # BP MOV, BP IDIV, DX DX OR, 8 L# JNS, BP DX ADD, 8 L: AX POP, AX Delta ) MOV, \ abs(delta x) BX AX CMP, \ delta_x - delta_y 5 L# JGE, ' steep640 # JMP, \ y changes faster than x 5 L: \ x changing faster than y AX BP MOV, \ for counter AX 1 SHR, AX Delta/2 ) MOV, \ halfx BX BX XOR, \ clear for cmp 6 L: BX PUSH, CX PUSH, \ x DX BX MOV, BX 1 SHL, Y>SegTable ) BX ADD, 0 [BX] ES MOV, CX BX MOV, BX 1 SHR, BX 1 SHR, BX 1 SHR, ES: 0 [BX] AL MOV, 1 # AH MOV, CL NOT, 7 # CL AND, AH CL ROL, AH AL OR, ES: AL 0 [BX] MOV, CX POP, BX POP, DI CX ADD, \ inc or dec x MAX-X 8 * # CX SUB, 9 L# JNS, MAX-X 8 * # CX ADD, 9 L# JNS, MAX-X 8 * # CX ADD, 9 L: SI BX ADD, \ = bx + delta_y Delta/2 ) BX CMP, \ bx > halfx ? 7 L# JLE, Delta ) BX SUB, \ bx - delta_x DX INC, \ y is always increasing MAX-Y 16* # DX CMP, 7 L# JL, DX DX XOR, 7 L: BP DEC, 6 L# JGE, BP POP, SI POP, BX POP, NEXT, END-CODE \ y changing faster than x CODE xsteep640 \ on entry, ax = delta x, bx = delta y, cx=x1, dx=y1 BX BP MOV, \ for counter BX 1 SHR, BX Delta/2 ) MOV, \ halfy BX BX XOR, \ clear for cmp 6 L: BX PUSH, CX PUSH, \ x DX BX MOV, BX 1 SHL, Y>SegTable ) BX ADD, 0 [BX] ES MOV, CX BX MOV, BX 1 SHR, BX 1 SHR, BX 1 SHR, ES: 0 [BX] AL MOV, 1 # AH MOV, CL NOT, 7 # CL AND, AH CL ROL, AH AL XOR, ES: AL 0 [BX] MOV, CX POP, BX POP, DX INC, \ y is always increasing MAX-Y 16* # DX CMP, 8 L# JL, DX DX XOR, 8 L: Delta ) BX ADD, \ = bx + delta_y Delta/2 ) BX CMP, \ bx > halfy ? 7 L# JLE, SI BX SUB, \ bx - delta_y DI CX ADD, \ inc or dec x MAX-X 8 * # CX SUB, 7 L# JNS, MAX-X 8 * # CX ADD, 7 L# JNS, MAX-X 8 * # CX ADD, 7 L: BP DEC, 6 L# JGE, BP POP, SI POP, BX POP, NEXT, END-CODE \ on exit, cx=x1, dx=y1, ax=x2, bx=y2 CODE xline640 ( x1 y1 x2 y2 -- ) \ writes to screen directly AX POP, DX POP, CX POP, SI PUSH, ( used to hold direction) BP PUSH, ( used as counter) \ see if we'll inc or dec x, y (draws in any direction) DX BX SUB, \ bx <- y2-y1 (delta y) 2 L# JGE, BX DX ADD, \ dx <- y2 BX NEG, \ abs(delta y) CX AX XCHG, 2 L: BX SI MOV, \ delta_y(BX) to SI CX AX SUB, \ x2 - x1 = delta_x 1 # DI MOV, \ di to increment x 4 L# JGE, -1 # DI MOV, \ di to decrement x AX NEG, \ abs(delta x) 4 L: \ adjust x1(CX), y1(DX) in proper range MAX-X 8 * # CX SUB, 1 L# JNS, MAX-X 8 * # CX ADD, 1 L# JNS, MAX-X 8 * # CX ADD, 1 L: MAX-Y 16* # DX SUB, 8 L# JNS, MAX-Y 16* # DX ADD, 8 L# JNS, MAX-Y 16* # DX ADD, 8 L: AX Delta ) MOV, \ abs(delta x) BX AX CMP, \ delta_x - delta_y 5 L# JGE, ' xsteep640 # JMP, \ y changes faster than x 5 L: \ x changing faster than y AX BP MOV, \ for counter AX 1 SHR, AX Delta/2 ) MOV, \ halfx BX BX XOR, \ clear for cmp 6 L: BX PUSH, CX PUSH, \ x DX BX MOV, BX 1 SHL, Y>SegTable ) BX ADD, 0 [BX] ES MOV, CX BX MOV, BX 1 SHR, BX 1 SHR, BX 1 SHR, ES: 0 [BX] AL MOV, 1 # AH MOV, CL NOT, 7 # CL AND, AH CL ROL, AH AL XOR, ES: AL 0 [BX] MOV, CX POP, BX POP, DI CX ADD, \ inc or dec x MAX-X 8 * # CX SUB, 9 L# JNS, MAX-X 8 * # CX ADD, 9 L# JNS, MAX-X 8 * # CX ADD, 9 L: SI BX ADD, \ = bx + delta_y Delta/2 ) BX CMP, \ bx > halfx ? 7 L# JLE, Delta ) BX SUB, \ bx - delta_x DX INC, \ y is always increasing MAX-Y 16* # DX CMP, 7 L# JL, DX DX XOR, 7 L: BP DEC, 6 L# JGE, BP POP, SI POP, BX POP, NEXT, END-CODE DECIMAL 10 CONSTANT scale 0 VALUE ? VARIABLE wз MAX-X 8 * 2/ VALUE xOffset MAX-Y 16 * 2/ VALUE yOffset VARIABLE xCoord xOffset xCoord ! VARIABLE yCoord yOffset yCoord ! : i ( -- ) FALSE TO ? ; : a ( -- ) TRUE TO ? ; : e ( y -- ) MAX-Y SWAP - TO YTop ; : e ( -- ) PAGE ; CODE sin* ( ១ b -- ១*sin[b] ) \ : sin* CELLS sin16384 + @ M* 16384 SM/REM NIP ; BX 1 SHL, sin16384 [BX] BX MOV, AX POP, BX IMUL, BX BX XOR, AX 1 SHL, DX 1 RCL, AX 1 SHL, DX 1 RCL, DX BX ADC, NEXT, END-CODE CODE cos* ( ១ b -- ១*cos[b] ) \ : cos* 90 + CELLS sin16384 + @ M* 16384 SM/REM NIP ; 90 # BX ADD, BX 1 SHL, sin16384 [BX] BX MOV, AX POP, BX IMUL, BX BX XOR, AX 1 SHL, DX 1 RCL, AX 1 SHL, DX 1 RCL, DX BX ADC, NEXT, END-CODE : .a ( x y -- ) scale / yOffset SWAP - \ x y1 SWAP scale / xOffset + SWAP \ x1 y1 ? IF 2DUP xCoord @ yCoord @ line640 THEN yCoord ! xCoord ! ; : ᦂa ( -- ) xCoord @ 8 wз @ 270 + sin* + yCoord @ 8 wз @ 270 + cos* - 2DUP xCoord @ yCoord @ xline640 \ x1 y1 xCoord @ 16 wз @ sin* + yCoord @ 16 wз @ cos* - \ x1 y1 x2 y2 2SWAP 2OVER xline640 \ x2 y2 xCoord @ 8 wз @ 90 + sin* + yCoord @ 8 wз @ 90 + cos* - \ x2 y2 x3 y3 2SWAP 2OVER xline640 \ x3 y3 xCoord @ yCoord @ xline640 ; : e ( -- ) YTop PAGE 0 OVER AT-XY TO YTop ᦂa ; HEX : {ei ( xt 'name2' -- ) DUP xt>name ?DUP 0= IF -12 THROW THEN SWAP head, linkLast C@ DUP 040 AND IF IMMEDIATE THEN 020 AND IF COMPILE-ONLY THEN ; DECIMAL ' IMMEDIATE {ei a ' RECURSE {ei A ' IF {ei e ' ELSE {ei ae ' THEN {ei a ' BEGIN {ei A ' UNTIL {ei a ' WHILE {ei e ' REPEAT {ei sЁ ' DO {ei ' LOOP {ei a ' I {ei a ' CONSTANT {ei et ' VARIABLE {ei et ' DUP {ei Aa ' OVER {ei ' DROP {ei a ' SWAP {ei a ' ROT {ei a ' >R {ei >A ' R> {ei A> ' R@ {ei A@ ' AND {ei {qA ' OR {ei {a ' XOR {ei {a ' MOD {ei aỡ ' CR {ei aq ' WORDS {ei ia ' .S {ei .ᣡ ' THEN {ei ENDIF ' = {ei == ' BYE {ei { ' BYE {ei EXIT ' BYE {ei exit et aá et Aá : Aa ( -- ) ᦂa 0 wз ! 0 aá ! 0 Aá ! 0 0 .a ᦂa ; : e ( -- ) i Aa e a ; : e ( -- ) 8 e e ; : e ( -- ) e e ; : .e ( b -- ) ᦂa wз @ + Aa 0 < e ( ba 0a bae) A 360 + ( 0 w I a 360i q) Aa -1 > a ae 360 aỡ ( 0a ae 360a a aỡi q) a wз ! ᦂa ; : .E -1 * .e ; : eq.a ( dx dy -- ) ᦂa Aá @ + ( dx y+dy ) Aa Aá ! ( dx y+dy ) a aá @ + ( y+dy x+dx ) Aa aá ! ( y+dy x+dx ) a ( x+dx y+dy ) .a ᦂa ; : |a ( l -- ) Aa ( l l ) wз @ sin* ( l dx ) a ( dx l ) wз @ cos* ( dx dy ) eq.a ; : ᝡ ( ១ -- ) -1 * |a ; : __e.ɍ ( ១ U -- ) 0 5 .e Aa |a 5 .e a a ; : e.ɍ ( eq b -- ) a 355 2034 */ ( b ១ ) ( ɍi 10 a a ) ( 2*pi*r*b/360*10 = pi*r*b/18 ) ( pi = 355/113 = 3.141593 ) Aa >A ( A ᣡA ១i i) 10 / ( b ១ U ) __e.ɍ ( b ) 10 aỡ ( b_aỡ ) Aa A> ( b_aỡ b_aỡ ១ ) ( 10a a aỡ bA Ёwae ១eq |a q) * 10 / |a ( b_aỡ ) .e ; : e. ( eq -- ) 360 e.ɍ ; : __E.ɍ ( ១ U -- ) 0 5 .E Aa |a 5 .E a a ; : E.ɍ ( eq b -- ) a 355 2034 */ ( b ១ ) ( ɍi 10 a a ) ( 2*pi*r*b/360*10 = pi*r*b/18 ) Aa >A ( A ᣡA ១i i) 10 / ( b ១ U ) __E.ɍ ( b ) 10 aỡ ( b_aỡ ) Aa A> ( b_aỡ b_aỡ ១ ) ( 10a a aỡ bA Ёwae ១eq |a q) * 10 / |a ( b_aỡ ) .E ; : E. ( eq -- ) 360 E.ɍ ; : A ( a -- ) 4 0 Aa |a 90 .e a a ; : såA ( -- ) 100 A 200 A 300 A 400 A ; : aaa ( -- ) 45 .e 4 0 såA 90 .e a ; : i ( a -- ) Aa |a Aa A ᝡ ; : ai ( a -- ) 6 0 Aa i 60 .e a ; : aq ( -- ) 100 ai 400 ai ; : ( a -- ) Aa 90 e.ɍ 90 .e 90 e.ɍ 90 .e ; : ( a -- ) 8 0 Aa 45 .e a a ; : ae ( a -- ) Aa 60 e.ɍ 120 .e 60 e.ɍ 120 .e ; : ae ( a -- ) 6 0 Aa ae 60 .e a a ; : Еi ( a -- ) Aa 90 E.ɍ Aa 90 e.ɍ Aa 90 E.ɍ 90 e.ɍ ; : Ё ( a -- ) 9 0 Aa Еi 160 .e a a ; : bw ( a ១ -- ) 360 / a ( a _b ១ ) 0 |a Aa .e a a a ; : i ( e_ y -- ) * 0 600 |a 360 * a / .e a a a ; : abw ( a b -- ) wз @ >A ( AᣡA q wзi i) A |a Aa .e wз @ A@ = a ( wз qwз {a a AΉ) a a A> a ; ( tᣡ A ᣡi ) : abwaw5 5 0 450 72 abw 72 .e a ; : abwaw4 4 0 700 135 abw 90 .e a ; : abwaw12 12 0 15 .e i 400 |a a 200 135 abw 15 .e a ; : a ( ab a aá -- ) >A ( aái AᣡA i) A@ e ( 'A@ 0 <> e' {q) .E Aa 2 * |a A@ 1 - A Aa 2 * ᝡ 2 * .e Aa |a A@ 1 - A ᝡ .E ae a a a A> a ; et ia 20 ia ! : w ( a -- ) Aa 0 = e ia @ |a ae Aa 0 > e Aa 1 - A ( a-1 w ) 90 .e 1 - A ( 1-a w ) ae -1 - A ( -1-a w ) 90 .E 1 + A ( 1+a w ) a a a ; : ai e ." 'iΑ'a e ᦂa aai bsa." aq aq ." DZiii ae 'ia' a á" aq ." DZii A ae ae 'i i' á" aq ." DOS a aae '{' a á." aq ." a iai { ae 'e' a ae 'e'a á" aq a 300 450 600 i 90 .E 2000 |a a 900 ae 700 ae 500 ae i 4000 ᝡ 90 .e a 300 Ё 1 iAbwȁ ! ; \ eib ai : TURTLE-hi DOSCommand>PAD GET-MODE TO OldMode# HGRAPHIC hi ." e Ae wi aI wykoh ." CR S" BLOCKS.BLK" MAPPED-TO-BLOCK ai QUIT ; ' TURTLE-hi TO 'boot ( aqi a a. ) ( aaa ) ( 400 i 400 ai aq ) ( 400 3 bw 400 5 bw 400 7 bw ) ( 5 2 i 7 2 i 7 3 i 8 3 i 9 2 i 9 4 i 10 3 i 11 3 i 11 5 i ) ( abwaw5 ) ( abwaw5 ) ( abwaw12 ) ( 30 400 4 a ) ( 20 250 5 a ) ( 20 250 6 a ) ( 50 ia ! 9 w ) ( 20 ia ! 12 w ) SET-CURRENT SET-ORDER BASE !