2 𩓍ЩЍЩR     S `I0ݭ  Ql`&jDoLLjjAIiciiFihmiiLI: HʕhiLm H `EXECUTŐ LBRANCȨ eHȱehLT 0BRANC iLR (LOOP  hhhhL (+LOOPHH}h}hL(DOOHHHHLR % nHLK 4 DIGIԇ80HLM  LLHLM H(FIND s Q)?/ȱQ %ieeHLK ȱеHLK ENCLOS$ s 88LR LR D8Up666uuuuLR CMOV s LR LU666uuuLR U" *66866L]dAN_5H5LM OtHLM XOҊUHULM SPHLK SPLR jRPLR ;hhLR iLEAVLR >RHHLR RhhLR %HLK 0;ȔLR 60P*LR UbHLhHLh~PIHLhHLhuuLR zDuuuuL[]MINU8LR DMINU8LoOVE HLK DRO]SWA'HLM DU?HLK +NuuL[9TOGGLoUL[K~HLM ICLR YL[CL[!i%s|f?9HHieLR CONSTAN? 9HȱLK VARIABL 9iHeLK USE 9eHeLK zkB sC/ #LINK"FIRSfLIMI {B/BUB/SC[HIME+ORIGI8 TIJ WIDTJ WARNINJFENCJD VOC-LINJBLJcIJOUUSCJ?OFFSEJICONTEXJ ^CURRENJ"kSTATJ$.BASJ&DPJ( FLJ*xCSJ,RJ.HLJ07INPJ2PHYSOFJ41e2mHER|ALLOTLmCe?+-9%|RO%%SPAC~"7-DU= = TRAVERSŏuuL]LATES]]Ms|fk |  ` % aCFm-CNFu-8 PFeuLFm-!CSR?ERRO%  1?COM~|9k 8L?EXE~|k 8c?PAIR-k 8x?CS|-k 8?LOADIN2|9k 8COMPILR=| ]~qk ~SMUDGk mHEk DECIMAk  (;CODE;COD9) >#EXPEC] %M"=9 f]f  QUER|k x?]:2| *e2L]:2|e-]9 i  FIL s LR 8ERAS]OBLANK~HOL8 L|PAk DWOR2|v  |:|%"k ":L -#97BITӋ s )LR ((NUMBER=| &|n]| eL NUMBE]]S=k -9=8 =~- =k .-]8]  HASe-]==m-FIN~>f|C=9 f|s|- s|C>(ABORT~cERRO|N # ? !2|v :|%NoID,k k _= -,%,k ]=,=k ]%#gCREAT|k `m8] i k !g=|Tk 9=k me-k ms| Cm-  |%m-m 8OMPILEi9]8 qLITERA~| 8 DLITERA~| %?STACk |%`e8k |`k 8INTERPREi ~||     |   CIMMEDIATk @mVOCABULARg)| )]Ms|fk m 8  wfFORTȃic"kj_l-kjnjDEFINITIONf|sk )>QUI]2TuM~|9  oK IABORTfig-FORTH 1.4S]8 .NCOLIJ# " #     ةlLS->=N+N "D+N xAB=!DAB=%MI  E %PMA  | %hM  7%7%M F#7 #%%/MO%MO*/MO*%M/MO]# % <PTA1  ALLOT-V @PRE1G3AL1L"EMPTY-BUFFERl|k b|M]fk k ADR]Yk DR8 Yk BFN]%l|k b|M=f|9 fk  %f%k BUFFE==9 l|#|#|#k =b|- '=k - k k -=b|9  b|k b|=b| - 5b|k k ] b||b||]O$]b|k b|b|| BLOCY|=b||-b|k 9r 8& =b|k 9 b||eO$eb|k   b|m|](LINE .LINd!e8 #]8 rMESSAG| Kv A=k E k -m k Y|-k @ k @# MSG # <(LOA2|:|]:2M:2!--]:2| -2LhICCBa"ICLHl"ICAD "TCIO֊" VHLK KE|"k f"eq"" ~=k 9 ]?"EMIe#"Ck "?TERMINA]"TYPv k f"q"|"" ~  #DECMAD#&*&   ee8 (iiLR "SIύ# YLR #SECI8 8 k ]m9 k @ k 8 k 8 k 18 ]#v k !;#DIk 8 #8 |k 8 #DDI8 8 #8 |8 8  R/ k R k P8 %8 ]8  =u]8 %k %=k ] E8 k r8 k ] ] 8 %k ]M=B#$  Dk ] mk ]M='$ "|k k ]M=$ !FLUSl|k b|Mfk k ] f|f|]O$efk k "UPDATk b|k "i9]8&%FORGEs|f|-k 8%=|`k 8)|# ` .|=) ]M=mfk =m|=l` % |v9 m-K$BAC- 6&BEGIRes%ENDIRm -%"$THE_&u&DMu&LOOu ;&#+LOOu;&Y&UNTIe ;&&EN&w"AGAIe ;&G&REPEA&m-_&&I ] m&ELSm ] %m_&m%WHIL'&SPACE]lv ]Mg &<,Y'#|, -'SIGSN k -'|(Sk | k k 0'#'  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K9r "JLto L|=|<("mLLIOPTAMOPOF*MMODOFA1OL|=0: eLL=v0gMIND8  MOPLU=]M=%8 @NOPAND=v *L|v0ge- L|v0 m`' 8 `' - v *e- L||m L|eLL0g 8 `'MMODMMm#g'NOPMMu#, "PMBR 8 9 ;L|=v0 - ==8 ] 8 r0LLg .NM1LINM NNNNNJMPEL|8 L9 FL||=I*9 )e-9r *9r >*9r 3*9r%)*9r=  ]L;CENL|=2L9%=L9r?Or#O1WR)OO )OOCSEOLDILO"LNDIL]M)O OISCODL|=m-|9  primitive "O IL||=m-|%LuK9  ;CODE word" odd entry point"O PISCOL|=|K- =|=K9 #L||L DOES> word"e %=L9  CONSTANT : L||0" U=L9 USER variable " 2'L9 ( VARIABLE : L|=0| = 0" P] eONXTm`'L|=0 : |mLLm`'LVML\L0MJL"[QFETCH%LP "8 @]  immediate" MNODECOMe8 Q`Q# MN 9OZQQBDUMe8 %Mf0gf8 ]M=f0g "8 ]8 QFIXQR8 ]M8 f-|8 |fmmVRN MXTR΃0@ `PASCINR****))RLR OSYP %MfR  ALLOT RBUƃ04/3 fig &/24(3&/24(3QDLISԃ0pPBJS#SDLPTCSRABORT1"SQUIT1"SINI]@@|=e- =uSe S% 8 "@SDSPLFSD1TOS->R*|8 |8 T  E  |]}''''''R D1# fig-FORTH 1.4SRRSS#TS"|=8 9 8 D8  @=8 9 8 8  &=m9 8 8  =8 8  <@TSTACKO8 T8 8 8 T8 P8 8 XR8 fR8 @USTACKOFS|8 8 S|8 P8 8 |8 ]A8 8 cUSTO'UUSTOlUN8 ~}I8 ]M=,f%f ,VRNUCDUMe8 %Mf0  f8 ]M=f" g8 ~""8 ]8 RPATC%%=8 BSJMЀVlzVJSғV VL]JCOL11VCOL21JEDLɾVHHVEO%NVEO%N ԎЍhh@VCOLSEA=8 ]V8 ]A8 ]VKTOPFLA1WL#FLǷ2VSPTCȷ2,WSFLǷ2VEDVE÷28WSOUNDOe2=WOWSOUNDOF]2=WUSNDOF]]]CBJP8 22W=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BL1`DIS`|8 `GTPA`|`|]``MVIaMf `e`L &aMOVOaY|%Y|%Mf& `%e`Lz%,% `DUPLICAT```|`|-DE8 -8 E  TOO MANY N"+aINSERT DESTINATION DISK "RETURN TO CONTINUE ""Oa`CPS"? Incorrect screen range"NbCPN"scr# %=<( --> %=<(=,%!_FIN0dd]M, cc%Mf==g<( wd.c " "" Search ended"cP1P:ePCI+ep VHLK aLPCN1$ePERR=N 8 ] P: ERROR ;eLPOPEu8 e8 m8 8 8 )eMeqeLYP8 8 8 8 )eMeeLPEMIeeeLPC8 eeAeLeLYP= =8 PE eAeLe 8 ee~cCRLeAe|8 =E eeee]AedFFL3fAe| 3f .fSHRIN8 e8 e3fcEXPAN8 e8 e3fWf.CL]}''''ef.L]}'''eeLINEL=fM|d!ele3frfSCR1SCR # fLISTL=Mf8 efe]Mff gLPSP]M8 e fSHOWL%8 9 hM3ff8 eff8 >gf8 eff3ff8 ]M=MfffM|d!e8 >g=Mff m M3ff g \f8gLPINDE%Mff]fd!ee RgSETSYSA|=>8 28 >8 28 A|=>8 28 >8 28 $A>8 28 GeHOO%8 2fUNHOO8 8 2gtranslat=9 8  ==8 `E%8 {|] 8 -htrnsbl8 ]M=f=h% nhPNSCOP% =h% 8 z%,%D`PNYM| hz% ]ZhDR8 fVERIF8 W8 ^$ViNOVERIF8 P8 ^$ hSY]@8 "8 "@iCLON8 "dGOBOOԿiLwiG'UN\8_Z)iWARNOeiWARNOF]i#SECjCALLDj SHLK FiDKI8 8 8 j=N !ERROR 8 ]|%$<(NiWTSE%8 8 tjGxX^saZ2jWARNOejWARNOF]Vj#SECjCALLDj SHLK iDKI8 8 8 j=Device Timeout Device NAK (Negative AcKnowledge) Serial Bus input framing error Cursor out of range Serial Bus data-frame overrun Serial Bus data-frame checksum error. Device-done error Read-after-write compare error Function not implemented in handler Insufficient RAM ( ERROR MESSAGES ) 135 159 9 8 7 10 ;S empty stack dictionary full has incorrect address mode isn't unique disc range ?? full stack ! disc error ! THIS IS IT HELP ME! ( USER INDEX SCR ... ....... ;S ̠ԺΠSCR #| Contents 00/00| INDEX 01/01| COVER SCREEN 02/06| ERROR MESSAGES 07/0A| BOOT MAKER - call SYS | | 0B/0B| disk RPM checker 0C/0E| FREE 0F/0F| low level DECOMP info ϠԠŠŠӠ17/18| REV.G COMMENTS 10/23| TUTORIAL 24/2A| COMMAND SUMMARY/REV NOTES30/32| DUMB TERMINAL V.1.0 33/37| Formatted LIST program 38/3F| FREE | | | | | | | | ϠŠϠŠԠƠŠˠŠŠξ****** fig-FORTH MODEL ****** Through the courtesy of FORTH INTEREST GROUP P. O. BOX 1105 SAN CARLOS, CA. 94070 Implemented on the ATARI 800/400 by Steve Calfee 1/26/81 4/01/82 PETER LIPSON/ROBIN ZIEGLER 4/10/82 HARALD STRIEPE 5/5/82 - 10/16/82 XL Mods - John Stanley 18Jun85 RELEASE 1.4S REV.H WITH COMPILER SECURITY VARIABLE LENGTH NAMES SWITCHABLE TOP OF STACK DISPLAY DECOMPILER/DISSASSEMBLER ENHANCED SCREEN EDITOR & FAST EDIT WORDS, BASE BORDER DISPLAY ENHANCED SYSTEM SET UP/BOOTMKR DRIVE 2 LINK/UNLINK Further distribution must include the above notice. Abort. IOCB already open. Non-existant device. IOCB is write-only. Invalid command (for this device) Device or file not open. Bad IOCB # IOCB is read-only End Of File Truncated Record Device Timeout Device NAK (Negative AcKnowledge) Serial Bus input framing error Cursor out of range Serial Bus data-frame overrun Serial Bus data-frame checksum error. Device-done error Read-after-write compare error Function not implemented in handler Insufficient RAM ( ERROR MESSAGES ) 135 159 9 8 7 10 ;S empty stack dictionary full has incorrect address mode isn't unique disc range ?? full stack ! disc error ! THIS IS IT HELP ME! ( ERROR MESSAGES ) compilation only, use in definition execution only conditionals not paired definition not finished in protected dictionary use only when loading off current editing screen declare vocabulary outside allocated file space writing off current line string stack empty !! ( TARGET COMPILER ERROR MESSAGES WFR-79JUN02 ) below lower bound of virtual memory disc compiler assembly error in mode of can't find in TARGET target redef. T: error, is it paired with T; ? above virtual memory bounds ( SYS/BOOTMAKER 1/4 ) FORTH DEFINITIONS HEX SAVENFAs HERE 1C +ORIGIN ! ( FENCE ) HERE 1E +ORIGIN ! ( DP ) HERE DUP FENCE ! 0 +ORIGIN - 80 / 1+ CONSTANT #SECT CODE CALLDK XSAVE STX, E453 JSR, TYA, PHA, ( STATUS ) XSAVE LDX, PUSH JMP, C; : DKIO 301 ! ( CMD, DRIVE # ) 30A ! ( SECT. # ) 304 ! ( RAM BUFFER ) CALLDK ( DKHND) DUP 0< IF ." ERROR " 0FF AND BASE @ SWAP DECIMAL . BASE ! QUIT ENDIF DROP ; : WTSEC SWAP 304 ! 130 300 ! ( verif $57->) 50 302 C! SECIO ; : RDSEC SWAP 304 ! 130 300 ! 52 302 C! SECIO ; : FORMAT ." FORMAT DRIVE " DUP . ." -ARE YOU SURE?" 0 PAD ! PAD 1 EXPECT PAD C@ 59 ( Y) = IF 2100 OR PAD 0 ROT DKIO ELSE DROP THEN ; 0 VARIABLE BOOT ( ->CODE ) --> ( SYS SET UP/BOOTMKR 2/4 ) : MAKEBOOT FLUSH EMPTY-BUFFERS ." INSERT NEW DISK, TYPE Y" CR 0 PAD ! ( DEFAULT ) PAD 3 EXPECT PAD C@ 59 = IF 1 52 C! CR ." Writing sectors:" CR CR BOOT @ 1 DUP . WTSEC #SECT 0 DO I 80 * +ORIGIN I 2 + WTSEC I 2 + . LOOP 0 52 C! CR ." BOOT COMPLETED" CR THEN ; ( BOOT CODE:) HERE BOOT ! ( PT TO US ) ASSEMBLER 1FF , 480 , ' V1.4S , #SECT # LDA, 0= IF, 0 +ORIGIN , 1 , ENDIF, N STA, 2C8 C@ # LDA, 2C8 STA, D01A STA, 2C6 C@ # LDA, 2C6 STA, D018 STA, 52 # LDA, 302 STA, 48C LDA, 30A STA, 48D LDA, 30B STA, ( SCT1 ) 1 # LDA, 301 STA, 48A LDA, 304 STA, 48B LDA, 305 STA, ( ORIGIN) BEGIN, 30A INC, 0= IF, 30B INC, ENDIF, E453 JSR, 303 LDA, .A ASL, CS IF, RTS, ( FRETURN ) ENDIF, 304 LDA, 80 # EOR, 304 STA, 0< NOT IF, 305 INC, ENDIF, ( BUMP PTR.) N DEC, 0= UNTIL, 48A LDA, 0A STA, 48B LDA, 0B STA, E C@ # LDA, 2E7 STA, F C@ # LDA, 2E8 STA, CLC, RTS, FORTH --> ( BACKUP HES 82AUG15 3/4 ) ( 35F ARRAY BUCD BLK @ BLOCK A0 + BUCD 35F CMOVE CODE bg E474 JMP, C; : BACKUP BUCD 480 35F CMOVE 480 C ! bg ; ) --> j8iR'Sx867X /E /XB / / / /1    I  Lȍ /ɠ R    /  ` /! 8  /Q P  `詀R@ YLii    R `Я` /m L / / L  ` LwPpM`W7 ` / Lfig-FORTH 1.4S FAST BACKUP Vers.1.2 BY H.E.STRIEPE 1982 START - commence I/O SELECT - write with verify OPTION - REBOOTInsert source disk and press START, or select OPTION to REBOOTReading SOURCE disk...Insert destination disk, press START, or SELECTWriting DESTINATION disk...****** DUPLICATION SUCCESSFUL *********** DISK I/O ERROR!TRY AGAIN *********** BREAK KEY INTERRUPT! ******( SYS SET UP/BOOTMKR 4/4 ) : DoFORget ( Forgets below ) ' TEXT NFA FENCE ! ( fence) 0 FORGET TEXT ; HEX LMARGN @ 2700 LMARGN ! ." }fig-FORTH 1.4S SYSTEM SET-UP Vers.1.1 " CR CR ." DoFORget WORD forgets below FENCE." CR CR ." n SETPHYS permanently changes the OFFSET of screen #0." CR CR ." RESPHYS resets the OFFSET to its original value; use" CR ." n SETPHYS twice to set RESPHYS to a new value" CR CR ." n FORMAT formats disk in drive n. " CR CR ." MAKEBOOT writes out compiled boot sectors." CR ." SETSYS sets booton parameters:" CR ." screen margins, colors" CR CR ( ." BACKUP fast single drive utility " CR ) LMARGN ! EMPTY-BUFFERS SP! ;S ( DISK RPM CHECKER 1/1 ) CODE ZIO XSAVE STX, BOT LDA, E459 JSR, XSAVE LDX, BOT STY, BOT 1+ STA, NEXT JMP, C; 246 CONSTANT DSKTIM : DSIO ( DISK HNDLR VIA SIO ) ( BADDR AUXS UNIT-CMD DATFLG ) 303 C! ( SET DATA-FLAG ) 301 ! ( DUNIT,CMD) 31 300 C! ( DEVICE) 30A ! ( AUXES ) 304 ! ( BUFER-ADDR ) 0 ZIO ; 1 VARIABLE DR# : BIO DSKTIM @ 306 C! 80 308 ! ( BUFLEN) DSIO ; : RDSEC 5200 OR 40 BIO ; ( DISK SPEED CHECKER ) 14 CONSTANT RTCLOCK 2F2 CONSTANT KBCHAR FF CONSTANT EPTY : READ-SEC PAD 1 DR# C@ RDSEC ; : CLR-KBRD EPTY KBCHAR C! ; : RPM DECIMAL CLR-KBRD 1 2F0 C! DR# C! 0 17 POS. ." = " BEGIN KBCHAR C@ EPTY = WHILE READ-SEC DROP 0 RTCLOCK C! 10 1 DO READ-SEC DROP LOOP D2F0 0 RTCLOCK C@ U/ SWAP DROP 4 17 POS. . REPEAT CLR-KBRD 0 2F0 C! HEX ; ;S ( ӠŠΠŠ ) ( DISK RPM CHECKER 1/1 ) CODE ZIO XSAVE STX, BOT LDA, E459 JSR, XSAVE LDX, BOT STY, BOT 1+ STA, NEXT JMP, C; 246 CONSTANT DSKTIM : DSIO ( DISK HNDLR VIA SIO ) ( BADDR AUXS UNIT-CMD DATFLG ) 303 C! ( SET DATA-FLAG ) 301 ! ( DUNIT,CMD) 31 300 C! ( DEVICE) 30A ! ( AUXES ) 304 ! ( BUFER-ADDR ) 0 ZIO ; 1 VARIABLE DR# : BIO DSKTIM @ 306 C! 80 308 ! ( BUFLEN) DSIO ; : RDSEC 5200 OR 40 BIO ; ( DISK SPEED CHECKER ) 14 CONSTANT RTCLOCK 2F2 CONSTANT KBCHAR FF CONSTANT EPTY : READ-SEC PAD 1 DR# C@ RDSEC ; : CLR-KBRD EPTY KBCHAR C! ; : RPM DECIMAL CLR-KBRD 1 2F0 C! DR# C! 0 17 POS. ." = " BEGIN KBCHAR C@ EPTY = WHILE READ-SEC DROP 0 RTCLOCK C! 10 1 DO READ-SEC DROP LOOP D2F0 0 RTCLOCK C@ U/ SWAP DROP 4 17 POS. . REPEAT CLR-KBRD 0 2F0 C! HEX ; ;S ( ӠŠΠŠ ) ( EMPTY BLOCK D ) ;S \ scr# E empty block 1/1 ;S !iDi@ @oiB i PiFiH H*ii WD@@x@uBxxPFHxHxHDH@c@lHBcTHc$PHFHHcH0HHcD@rB{T'PFHD@@@E PFHHJ`BZD]B`@Z@]@ZB`Z]PZF`HZH]J3Z`Z]> DECOMP DISASSEMBLER STUFF << DO NOT MOVE FROM THIS SCREEN ! ( Greetings from ) 24 LIST = crib sheet > welcomes you to the world of Atari fig-Forth. We aretrying to make FORTH easy for you to learn and use. Since we are learning too, we would be pleased to get any feed back youmay have on this version of fig-FORTH, and the included documen-tation. Please send any commentsto Team Atari, 4029 Payne Ave., San Jose, Ca., 95117 or leave E-mail on Compuserve for [70525,434] We'll try to answer all correspondence. (TYPE LL) ȫThis disk is an attempt to writea self-tutorial on using this version of fig-FORTH. Just read the text and try the examples byplacing the cursor on the line with the example and pressing the key. Have fun. 0 LIST is a catalogue. Let's try out a couple of words.( UPPER LIST & LOWER LIST ) Ok To begin, type in the lower screen area. First type UL then to return here type LL , then to go to the next screen by pressing ( PREVIOUS, NEXT, TOGGLE )Now type P and then use the T command to get back here. OK, N = next, P = previous and T = toggle; FORTH stores the last two screens you LOADed or LISTedor EDITed in two buffers which you can toggle by using . This is especially handy to compare screens from different areas of a disk, or from two different disks. The next handy-dandy command to learn is the INDEX word. (TYPE LL TO CONT.) INDEX is the word you use to seewhat is on one of your FORTH source disks. It shows you the first line of each screen on thedisk. ( perhaps I should mentionthat FORTH organizes the disk inscreens, the units you have beenlooking at, i.e. that which willfill up a TV screen. A good ruleto follow is to make the first line of any screen you write a short description of what is on the screen. Then when you use INDEX you get a quick list of the contents. By printing this you have a nice (TYPE N) ( ."/LPINDEX/SHOWLP/LPOPEN/ )listing of the contents of the disk. To try this out type in the following line down below: 0 GR. 0 4D INDEX or you might try useing and then typing 0 4D INDEX. ( Must be in caps ) <."> is a FORTH word pronounced DOT QUOTE that works with <"> pronounced QUOTE to print the text included between them. 宮ϠΠŠŠŠ報̠宠 Now to print the Index, you needto get your printer all ready, type LPOPEN, and then type- 0 4D LPINDEX. This will print itout. To print any single screen you type xx LISTLP (xx being thescreen number). Two screens may be shown side by side on a page from the printer by typing - xx SHOWLP. This will print scrn.xx and the next screen after xx. ҠϠΠŠŠ ( BACKUP/CSECTS/WARN/GS/WS/N/+ )By now you may have wondered howto copy this disk. You can't do it using standard DOS as there is no Directory on a FORTH disk.You can use 'SUPERDUP', ARCHIVE,or any other sector copier. The word SYS will load several useful words like FORMAT and MAKEBOOT. MAKEBOOT makes a boot-able disk with all the words youhave defined included. SYS will load a menu screen giving instructions. NOTE: DO NOT MOVE any of the screens 1 through B and F !!! (type LL) To turn on the english error message system, type WARNON. To turn them off and get only # msgs type WARNOFF. The options available now for screen color are GS=green scrn, WS=white screen, NS=normal scrn,BS=black screen. Give them a tryand see which ones you like. Now try HX, DX. The border colorwill change to remind you which number base you are in. HEX & DEC or DECIMAL are good too. (type N to cont.) ( GENERAL INFO. ) Now that we have some basic tools with which to find our way around the disk, a little general information on how the goodies are stored here. This disk contains most of the words of this version of fig-FORTH in the compiled form, i.e. they areLOADed and ready to use. You gotthe list of words available to you if you printed out the VLIST. The second disk in this package contains a very small # of words in compiled form and (type LL to cont.) the rest are on source screens. This allows you to keep your kernel (the compiled words) of FORTH as small as possible, thussaving as much memory space in RAM as possible. The more words compiled in RAM the less room for you to work with in your ownapplications. In order to add a section of words to the kernel just LOAD the screen they are onby typing xx LOAD. (xx is the screen number). xx L& turns of the screen for faster compila- tion, but use it only on tested screens. (type N to cont.) ( LIST/L./DOIT/WIPE )The format you have been using so far is the EDITOR format. You can look at screens in two different formats. By typing L# you will get line numbers on theediting screen to facilitate useof line edit commands. If you want to get rid of them later just type NL# and they will go. The other major format for look-ing at screens is the LIST or L.format. Type xx L. to see this one. (type LL to cont.)In the LIST format you have to use the <1> key to stop and start the scrolling of the screen. The next screen is blank so you can try some screen editing. Type N to go there and then typeon the screen. When done use thecursor arrow keys to move down to the line with "DOIT" on it & press the key. Then type FH or FLUSH to save it to the disk. To erase it type 16 WIPE, or W while in the editor (TYPE 17 UE TO SKIP THAT)\ scr# 16 empty block 1/1HELLO ( scr# 17 REV.G COMMENTS ) ;S ( HES 82SEP27 ) REV.G has a number of bug fixes for REV.A OS. It also interceptsthe DOSINI vector during BOOT, and at WARMSTART (RESET). This makes it possible to set screen colors and margins at boot up and reset. Simply set your margins and screen colors before calling SYSSelect STACKON or STACKOFF. Thencommand SETSYS, and MAKEBOOT. Your new disk will now boot in your colors, and have your mar-gins. You can also hook in an ML SUB- ROUT.at this time. It must have been defined prior calling SYS. After calling SYS, command HOOK word (356-3921, or you can leave MESSAGES at the following BBS's: TABBS <408> ???-???? IBBS <408> 298-6930 (The latter is the preferred communications technique.) Since DAVE FLORY is distributingthis package, naturally he can also be contacted. May fig-FORTH be with you... H.E.STRIEPE by John A. Peters 239-5393( PLAYER/MISSILE DEMO )Now let's take a look at the player/missile demo. To do this please type 1A 1B SHOWLP. If youhave not previously used the printer words type LPOPEN first.Then you will have the two scrnsprinted out and can compare themas you read the rest of this. The B/H word is used to convert a binary shape table to hex and decimal for use in Players and missiles. See screen 1C for moreinfo. ( type 1C UE to cont.) ( PLAYER/MISS.STUFF-RZ 1/1 ) 0 VARIABLE 0VP 64 VARIABLE 0HP 0 VARIABLE 0VPOLD : SPB HIMEM @ 1+ F800 AND 800 - DUP Qbase ! 17F + HIMEM ! ; : GETPS 0VP ! ROT BLOCK ROT + Qbase @ 400 + 0VP @ + ROT CMOVE ; : SPLAY 0 0 HPOS! 7 GR. SPB Qbase 1+ C@ PMBASE C! 2A 0 COLPM! 1 0 SIZE! 3E D400 C! 3E DMACTL C! 3 GRACTL C! 1C 20 8 64 GETPS ; : CLRPM Qbase @ 800 ERASE ; : MOVEH 0 STICK F XOR C AND DUP IF 2 / 3 - ENDIF 0HP @ + DUP 0HP ! 0 HPOS! ; : VPOS! 0VPOLD @ 9C00 + DUP 9800 8 CMOVE 8 ERASE 9C00 + 9800 SWAP 8 CMOVE ; : MOVEV 0 STICK F XOR 3 AND DUP IF 2 * 3 - ENDIF -DUP IF 0VP @ DUP 0VPOLD ! + DUP 0VP ! VPOS! ENDIF ; : RUNIT BEGIN MOVEH MOVEV 2FC C@ FF = NOT END ; : BN BINARY ; : OCT OCTAL ; : B/H DUP HEX ." HEX =" . DX ." DEC.=" . BN QUIT ; 6 GPRIOR C! ;S ;S ( P/M COMMENT & INSTRUCTIONS by Dave Flory/ Bay Area User Group. 0VP = P/0 vert. position 0HP = P/0 hor. position 0VPOLD = P/0 old vert. position GETPS = get player shape & placein P/M memory space. SPLAY = show player. The 2A in front of the COLPM! is the colorof player in HEX. The first no. in front of SIZE! is the P/Mwidth no., 2nd is no. of P/M. The no.s for GETPS in SPLAY are:1. the no. of screen holding P/M2. the # of bytes into the scrn.where the Player data starts. 3. the # of bytes of player data4. the hor. pos. to show player You must be careful to place thedata correctly on the data scrn.Count in carefully and enter thedata in characters. This is doneby using BDUMP to enter the HEX numbers into RAM buffer positioncorresponding to the screen. SeeBDUMP comments & comments on thenext screen which holds sample player data. ) (TYPE N TO CONT.) ( PLAYER/MISSILE SHAPE TABLE ) Z<~$< The characters on the top of thescreen were entered into the scrbuffer usinG BDUMP after gettingthe correct HEX numbers using the B/H word. It is already available in this version. (Whenworking with the source disk Load the P/M screen.) (Type LL to cont.) This will give the numbers for asmall flat box shape: BN 11111111 B/H HEX =FF DEC.=FF 10000001 B/H HEX =81 DEC.=81 10000001 B/H HEX =81 DEC.=81 11111111 B/H HEX =FF DEC.=FF To use B/H you must be in BN or binary base, then you enter the binary shape line and type B/H and press , FORTH will type the HEX and DEC. no.s for you. (Type N to cont.) ( BDUMP/ EXAMPLE ) To put these numbers onto the disk without having to look up Atari control keys in the table,you use the BDUMP word. In this case it works like this. You type the following: 1C BLOCK DUP 2A + BDUMP This gives youthe top 2A character positions of screen 1C displayed on the monitor. You then count in the number of spaces you want the data to be and enter it on the screen using the cursor and pressing on the same line. (Type LL to cont. ) It looks like this: 1C BLOCK DUP 2A + BDUMP 0500 28 20 50 4C 41 59 45 52 \ 0508 2F 4D 49 53 53 49 4C 45 \ 0510 20 53 48 41 50 45 20 54 \ 0518 41 42 4C 45 20 29 20 20 \ 0520 18 FF 24 DB 24 5A 99 81 \ 0528 20 20 20 20 20 20 20 20 \ oK The place that the player is on now is displayed on line 520. By putting the cursor on that line and typing in the no.s you see how I entered the player shape. (type N to cont.) ( SPLAY/RUNIT/GRAPHICS WORDS ) Enter 6 GPRIOR C! To see the shape and run the player/missile demo type SPLAY and RUNIT. This will display theshape under the control of joy- stick 0. You will notice that the shape "hides" behind the text window and and the stack display (if the latter is on). Later you can draw some play- field stuff and experiment with making him go in front of some and behind others by putting a different # in GPRIOR. ( LL ) The graphics commands in this FORTH for the Atari are very like those you use in BASIc except that as you have noted here the numbers come first not after the commands. x C. = COLOR x x GR. = GRAPHICS x x y PL. = PLOT x y x y DR. = DRAWTO x y similarly POS. is POSITION, SE =SETCOLOR, etc. The fill command is XIO18 and it requires you to put the fill color on the stack first. (N) ( DEMO OF P/M PRIORITY )( For a demo load this screen. It will draw a couple of bars of vertical colors for the bug to play in. After typing SPLAY type 1F LOAD then type RUNIT. ) DX 1 C. 90 90 PL. 90 10 DR. 80 10 DR. 80 90 POS. 1 XIO18 ( FIRST BAR ) 2 C. 70 90 PL. 70 15 DR. 50 15 DR. 50 90 POS. 2 XIO18 ( 2ND BAR ) 3 C. 30 40 PL. 30 20 DR. 10 15 DR. 10 80 POS. 3 XIO18 ;S 3rd bar fill runs over to the right this time (LL) as the POS. statement is lower than the initial PL. statement for this bar. After looking at this one play around a little. It will take some work to make this display four players at the same time, but its fun to try. You may wantto go back and redefine some of the words to expect the player number on the stack to tell themwhich player to work on, or you can just define a word for each player and call them by name. Hope you have fun. (N) ( STACK DISPLAY )One of the nice features of thissystem is the stack display. To use it just type STACKON. Then type a few numbers and press . You will see them showon the stack display at the top of your monitor screen. To turn it off when unwanted STACKOFF. You will find the STACK display very useful to you as you start defining your own words as you can go through each step in the word singly and watch what it does to the stack. The stack is the single most difficult (LL) thing for most begiinning FORTH nuts to understand, and this display is used by even the experienced programmers I know. Put some numbers on the stack and try some of the Math words like + and /, and *. Use SWAP, and ROT, and . and DROP, etc. and observe their stack effects. THIS Forth is based on the HEX number system ( 1 2 3 4 5 6 7 8 9 A B C D 10 11 12 etc.) ( DECOMPILER/DCP/ZZ )Now we come to one of the most useful and powerful words in thevocabulary of this FORTH versionthe decompiler word. To use it just type DC xxxx, with xxxx theword you want decompiled or taken apart. This word works on even the primitive words in the fig-FORTH kernel. Try a few of the simple words first, like GS, or NS. When you do you will find that the numbers above 0,1,and 2 all have LIT after them. The first three are used so muchthat they are FORTH words. (LL) ( screen 21 ) The LIT tells FORTH that the They are to be taken as literal values. To give you an idea how this works try typing in this definition and then DC AS. DX : AS 26 709 C! 18 710 C! 16 712 C! ; You now have another word avail.to you AS or amber screen. To make this a permanent part of your disk you can use MAKEBOOT to write out all the compiled words you have in RAM. (N) ( TEXTS ON FORTH )This should give you enough to think about for quite a while ifyou are new to FORTH. We haven'ttried to make you a programmer, but just to introduce you to thefeatures of this version of the language and help you over a fewof the initial rough spots. There are several good books fornew people in FORTH. The one I personally found most helpful was Ҡ published by McGraw Hill. The best next book and probably the best (LL) if you can only afford to buy one is Ǡ by Leo Brodie, and published by FORTH Inc. I wish you the best of luck and hope that you will keep us up todate on your extensions to this language. We will try to act as a clearing house for ATARI FORTHpeople. AS we come up with more features we will add them to thepackage. we will try to upload the new stuff onto Compuserve ACCESS area so that you can get (N) ( CONCLUSION )updates without a lot of mailingdisks and paying postage. To this end I suggest that you keepthe original source disk withoutchange so that you can recompileyour working kernel as you get updates. If someone writes us a terminal prgram written in Atari FORTH we will make it available immediately so that wecan all communicate FORTH stuff more easily, without typing in the screens on the keyboard. (LL) That's all, keep on SWAPing, Dave Flory Presently pres. BAY AREA USER GROUP 4029 PAYNE AVENUE SAN JOSE, CALIF. 95117 408) 244-7181 COMPUSERVE [70424,434] 嬠 PLEASE COPY AND PASS THESE DISKSAROUNDTO EVERY ONE YOU KNOW \ scr# 24 empty block 1/1 ;S L,N,P - List current,next or previous screensLL - List lower 1/2 of current edit screenUL - List upper 1/2 of current edit screenDOIT - Take top 16 lines of screen and place them into the top or bottom 1/2 ( LL or UL ) of the edit screen. x y COPY - Copy block x to block y. No change to block x n LIST - Set SCR to n and list the block x y SHOW - List blocks x to y inclusive x y INDEX - List first line of blocks x thru y FLUSH - Return to FORTH voc and write out all updated blocks UPDATE - Mark block (SCR) as updated fig-FORTH 1.4S comnds next block ԠԠ EDT - same as EDITOR FORTH - exits EDITOR without action n UE - same as n EDIT UL n LE - same as n EDIT LL N - edit next upper scrn N. - edit next lower scrn P - edit prev upper scrn p. - edit prev lower scrn T - edit other upper scrn in buffer T. - edit other lower scrn in buffer FH - same as FLUSH WIPE - clr scrn to be edited W - WIPE,will respond with question, RETURN or Y will execute LOAD - FLUSH scrn edited,and LOAD n LOAD - will flush and load n L#OFF - off LINE # display L#ON - on LINE # display SOUNDOFF - remove tone cue (the beep heard for various edit comnds) SOUNDON - reset tone cue LINE EDITOR COMMNANDS NXT SCRN ҠŠǠ n TL - Type line n >(PAD) n HL - line n >(PAD) n DL - Delete line n >(PAD) n IL - Insert (PAD) after n n RL - Replace n with (PAD) n SL - Spread at line n n BL - Blank line n n $_ - Text following $_ will replace line n and go to PAD n %_ - Text following %_ will be inserted after line n and go to PAD s n CL - Move line n of block s to PAD *** NOTE *** >(PAD) : Means that line n is also moved to PAD ( fig-FORTH 1.4S COMNDS NXT ) ȠӠ n1 n2 n3 COPIES - move scrns n1 to n2 to location starting at scrn n3 (n1-->n3, n1+1-->n3+1 etc.) n1 n2 DUPLICATE - will duplicate scrns on a single drive SYS - loads bootmaker and related words on SCREEN # $7 STACKON - turn stackdisplay on STACKOFF- turn stackdisplay off NOTE: BORDER REFLECTS # BASE STON - STACKON STOF - STACKOFF WARNON - display warning txt WARNOFF- just display error # DRAIN - EMPTY-BUFFERS n1 n2 LZERO - CLEARS scrns n1 to n2 n SETPHYS - set PHYSOFF to n RESPHYS- reset PHYSOFF to orgnl value, use n STEPHYS twice to chnge RESPHYS DCP - DECOMP ZZ - DECOMP x y CDUMP - dump char. x to y, USE LIKE BDUMP- cont nxt scrn ȠӠ ٠ ӯàŠn >< - swap bytes n MSBYTE - leave MSB of n n LSBYTE - leave LSB of n VAR - TO variable n TO will ! n will @ n MSB - shortform MSBYTE n LSB - shortform LSBYTE ٠ҮĠšӠx y FIND text - search for text starting with scr# x to y, willsearch all scr of DR1 as defaultabort by pressing START button NS,GS,WS,BS - change screen colors n U. - n . unsigned VERIFY & NOVERIFY - change diskhandler write command n SNDOFF - turn off channel n (e.g. n 0 0 0 SOUND) THERE - returns adr below display FREE - THERE HERE - OCTAL - change BASE to 8 BINARY - change BASE to 2 HX,DX,BX - shortforms PON now does not require POFF in same expression. (contd.)( fig-FORTH 1.4S COMMANDS ) ;S n CHR selects between three character sets, 0 is the normal ATARI vers n .CHRSET prints out the desired set read the TUTORIAL on the use of BDUMP and CDUMP ( note that CDUMP has a bug, and cannot handle 's ) There are several ways to accessthe second drive in a two drive system. Screens starting at $800will access the second drive. Ifyou are in the LINKed mode, SCR#$0 will start with the same PHYSOFF as dr 1. UNLINK starts drive two on the first sector. You can also use the standard Forth procedure and call DR0 fordr 1, and DR1 for dr 2. Each inthis case have their own PHYSOFF, which can be set with XXYY SETPHYS, where YY is the PHYSOFF for dr1, and XX for dr2. < N > \ scr# 2A REV H NOTES HES Note that a 2 SETPHYS will set the PHYSOFF for dr2 to 0. NEWDATE lets you enter your initials and date that will be usedin the EDITOR by DATE to date the comment line. In FORTH, DATE requires a screen range on the stack. ( Works well with LZERO ).PNS will convert a PNS screen that you might be editing. Just do the normal n UE (n is scr#), than command PNS. The \ comment line is now also acceptable to fig-Forth. PICK and ROLL also have been added. n PICK will take the nth item on the stack, and duplicate iton top, n ROLL just rolls it to the top. SETSYS, HOOK/UNHOOK are now partof the std. vocabulary. JMP andJSR permit ML experiments, justleave the address of your routine on TOS. DR2 adds $800 to scr# (makes it easier when using DECIMAL mode). ( scr# 2B empty block 1/1 ) ;S ( scr# 2C empty block 1/1 ) ;S ( scr# 2D empty block 1/1 ) ;S ( scr# 2E empty block 1/1 ) ;S ( scr# 2F empty block 1/1 ) ;S ( FORTH TERMINAL HES 1/3 ) ( V.1.0 HES 82AUG24 ) ( USES IOCB #2/R1:,HANDLER ) ( already booted ) FORTH DEFINITIONS HEX ( OPEN #2,R1: INPUT/OUTPUT ) : OPNR: 2 IOCB ( IOCB #2 ) 0 D R1: OPEN ( INP/OUT ) ( ICSTA CH? ) ; ( STATUS ) ( CONFIG.#2,NO TRANSL,ATASCII ) : CNFGR: 2 IOCB ( IOCB #2 ) 26 ICCOM C! R1: ICBAL ! 20 I1CAX ! CIO ( ICSTA CH? ) ; ( STATUS ) 0 VARIABLE STR: ( COMMAND n --- ) : STATR: 2 IOCB D ICCOM C! ( COMMAND ) CIO ; ( STATUS ) ( START CONCURRENT IO ) : STRTR: 2 IOCB 28 ICCOM C! R1: ICBAL ! 0 I1CAX C! CIO ( ICSTA CH? ) ; ( CLOSE R: ) : CLSR: 2 IOCB CLOSE ; ( CHECK R:BUFFER ) : ?RBUF STATR: 2EB @ ; --> ( FORTHTERM V.1.0 2/3 ) ( CHECK KEYBOARD : ?CHLEAVE CH C@ FF = NOT IF FF CH C! ." Leaving " CR LEAVE THEN ; ) ( GET R: ROUTINE ) : GETR 2 IOCB GET ; ( PUT R: ROUTINE ) : PUTR 2 IOCB PUT ; ( K: routines use IOCB #3 ) : K: " K: " DROP ; ( Open for INPUT ) : OPNK: 3 IOCB ( IOCB #3 ) 0 4 K: OPEN ( INPUT ONLY ) ( ICSTA CH? ) ; ( STATUS ) ( CLOSE ) : CLSK: 3 IOCB CLOSE ; ( GET INPUT --- n ) : GETK 3 IOCB GET ; --> ( FORTHTERM V.1.0 3/3 ) : TERMINAL CR CR ." fig-FORTH TERMINAL V.1.0" CR CR ." --> exit" CR CR ." mode, " CR CR 0 2BE C! ( lower case ) OPNK: OPNR: CNFGR: STRTR: BEGIN ?RBUF IF ( BUFFER ?? ) GETR EMIT THEN ( GETIT ) CH C@ FF = NOT ( KEY PRESS ) IF GETK PUTR THEN ( SEND IT) ?CONSOL 7 AND UNTIL ( EXIT ) CLSK: CLSR: CR CR ." Leaving terminal mode." 40 2BE C! CR CR ; ;S ( FORMATTED LIST PROG. 1/5 ) VOCABULARY FORMY IMMEDIATE FORMY DEFINITIONS BASE @ OCTAL 40 CN SPACBYT 54 CN COMCHR : IARRAY 0 VARIABLE -2 ALLOT ; : 0> DUP 0= IF DROP 0 ELSE 0< 0= THEN ; 0 VARIABLE INDENT 106 CN FCONS 111 CN ICONS 0 VARIABLE TLFLG 0 VARIABLE KERKNT 100 CN MAXLIN : NXSPACE >R 1+ >R 0 R> R> DO SPACBYT I C@ = IF DROP I LEAVE THEN LOOP ; : NXNSPACE >R 1+ >R 0 R> R> DO SPACBYT I C@ = 0= IF DROP I LEAVE THEN LOOP ; : GTNXWD DUP IF + OVER SWAP NXSPACE ELSE DROP THEN DUP IF OVER SWAP NXNSPACE DUP IF OVER OVER NXSPACE DUP IF OVER - ELSE DROP OVER OVER - 1+ THEN ELSE DUP THEN ELSE DUP THEN ; : TORLCR TLFLG @ IF CRLP ELSE CR THEN KERKNT 0SET ; : TORLY DUP 1+ KERKNT +! TLFLG @ IF LYPE ELSE TYPE SPACE THEN ; : DOIND INDENT @ 0> IF INDENT @ 0 DO 0 0 TORLY LOOP THEN ; : PRWORD DUP 1+ KERKNT @ + MAXLIN > IF TORLCR THEN KERKNT @ 0= IF DOIND THEN OVER OVER TORLY ; : 1SET 1 SWAP ! ; --> ( FORMATTED LIST PROG. 2/5 ) : ( 51 WORD 6 ALLOT ; : IA IARRAY ; IA L1G 10 , ( :) ( CODE) ( ,CODE) ( SUBROUTINE) ( IA) ( IARRAY) ( LABEL) ( TBL) IA L2G 2 , ( ;) ( C;) IA L3G 2 , ( NXT,) ( NEXT,) IA L4G 6 , ( IF) ( DO) ( IF,) ( CASE) ( BEGIN) ( BEGIN,) IA L5G 3 , ( ELSE,) ( ELSE) ( WHILE) IA L6G 16 , ( THEN,) ( THEN) ( END,) ( END) ( SOB,) ( BACK) ( UNTIL) ( AGAIN) ( REPEAT) ( ENDIF,) ( UNTIL,) ( LOOP) ( +LOOP) ( ENDIF) IA L7G 7 , ( CONSTANT) ( IR) ( VARIABLE) ( CN) ( ARRAY) ( INTEGER) ( ORCON) IA L8G 1 , ( () IA L9G 3 , ( LD,) ( ST,) ( LOAD) IA LAG 1 , ( ;CODE) : CMPWORD DUP >R C@ OVER = R> SWAP IF >R OVER R> SWAP OVER DUP C@ DUP 4 > IF DROP 4 THEN 0 DO I OVER + 1+ C@ >R OVER R> SWAP I + C@ = 0= IF 0 LEAVE THEN LOOP 0= IF DROP DROP 0 THEN ELSE 0 THEN ; --> ( FORMATTED LIST PROG. 3/5 ) : GSCAN DUP @ SWAP 2+ SWAP 0 DO CMPWORD IF LEAVE 0 ELSE 6 + THEN LOOP IF 0 ELSE DROP 1 THEN ; : NEWCR KERKNT @ IF TORLCR THEN ; : DUPBC OVER >R >R OVER R> SWAP R> ; : FINDCHAR SWAP >R SWAP 1+ R> DO DUP I C@ = IF DROP I LEAVE 0 THEN LOOP IF 0 THEN ; : PRNEWL PRWORD TORLCR ; : >= OVER OVER = IF DROP DROP 1 ELSE > THEN ; --> ( FORMATTED LIST PROG. 4/5 ) : EL1G NEWCR INDENT 0SET PRWORD GTNXWD PRNEWL 10 INDENT ! ; : EL2G NEWCR PRNEWL INDENT 0SET ; : EL3G NEWCR PRNEWL ; : EL4G NEWCR PRNEWL 2 INDENT +! ; : EL5G NEWCR -2 INDENT +! PRNEWL 2 INDENT +! ; : EL6G NEWCR -2 INDENT +! PRNEWL ; : EL7G PRWORD GTNXWD PRNEWL INDENT 0SET ; : EL8G DUPBC 51 FINDCHAR DUP IF SWAP DROP OVER - 1+ PRNEWL ELSE DROP PRWORD THEN ; : EL9G PRNEWL ; : ELAG NEWCR 10 INDENT ! PRNEWL ; : ASSWRD DUP 4 >= IF OVER OVER + 1- C@ COMCHR = IF OVER DUP C@ ICONS = SWAP 1+ C@ FCONS = AND IF 2 ELSE 1 THEN ELSE 0 THEN ELSE 0 THEN ; --> ( FORMATTED LIST PROG. 5/5 ) : PRCWRD L1G GSCAN IF EL1G ELSE L2G GSCAN IF EL2G ELSE L3G GSCAN IF EL3G ELSE L4G GSCAN IF EL4G ELSE L5G GSCAN IF EL5G ELSE L6G GSCAN IF EL6G ELSE L7G GSCAN IF EL7G ELSE L8G GSCAN IF EL8G ELSE L9G GSCAN IF EL9G ELSE LAG GSCAN IF ELAG ELSE ASSWRD IF ASSWRD 2 = IF EL4G ELSE PRNEWL THEN ELSE PRWORD THEN THEN THEN THEN THEN THEN THEN THEN THEN THEN THEN ; : FORLST TORLCR DUP TLFLG @ IF LISTLP ELSE TORLCR LIST THEN TORLCR TORLCR DUP BLK ! BLOCK DUP 1777 + SWAP KERKNT 0SET INDENT 0SET 0 BEGIN GTNXWD DUP IF PRCWRD THEN DUP 0= END DROP DROP DROP BLK 0SET ; : ASTER TORLCR 40 0 DO 52 SP@ 1 TORLY DROP LOOP TORLCR ; : FORSHW 1+ OVER DO ASTER I FORLST TORLCR LOOP DROP ; FORTH DEFINITIONS : FLST FORMY TLFLG 0SET FORLST ; : FLSTLP FORMY TLFLG 1SET FORLST FFLP ; : FSHW FORMY TLFLG 0SET FORSHW ; : FSHWLP FORMY TLFLG 1SET FORSHW FFLP ; LPOPEN ;S \ scr# 38 empty block 1/1 ;S ( scr# 39 empty block 1/1 ) ;S \ scr# 3F empty block 1/1 ;S