{{ Modified Tiny Basic for use with Propeller Demo Board and Hydra. Original Tiny Basic written by Tomas Rokicki & Radical Eye Software. Copyright (c) 2008 Michael Green. See end of file for terms of use. }} '' Note: There are three places in the next 50 lines where there are '' pairs of lines with one commented out. One is marked TV '' and the other is marked VGA. All three places should have '' the appropriate line commented out for the display being used. '' The combination of Hydra and VGA is not supported because the '' I/O pins used for the SD card and the VGA display conflict. {{ --------------------------------------------------------------------------------------------------------- Hive-Computer-Projekt Name : FemtoBasic Chip : Regnatix-Code Version : 0.1 Dateien : Beschreibung : Modifiziertes FemtoBasic für den Hive. Eigenschaften : Logbuch : 29.04.2009 - erste an ios angepasste version - eeprom-zugriff deaktiviert Notizen: --------------------------------------------------------------------------------------------------------- }} obj ios : "ios.spin" con _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 version = 3 ' Major version release = 006 ' Minor release testLevel = 0 ' Test change level ' progsize = 8192 ' Space reserved for program progsize = $3FFF _stack = 100 ' Roughly 4 nested expressions _free = (progsize + 12) / 4 bspKey = $C8 ' PS/2 keyboard backspace key breakKey = $CB ' PS/2 keyboard escape key backspace = 8 fReturn = 13 fLinefeed = 10 fEof = $FF maxstack = 20 ' Maximum stack depth linelen = 256 ' Maximum input line length quote = 34 ' Double quote caseBit = !32 ' Uppercase/Lowercase bit ' userPtr = $7FEC ' Pointer to program memory userPtr = $4000 var long sp, tp, eop, nextlineloc, rv, curlineno, pauseTime long vars[26], stack[maxstack], control[2] long forStep[26], forLimit[26], forLoop[26] long ioControl[2] word outputs byte tline[linelen], tailLine[linelen], inVars[26], fileOpened dat tok0 byte "IF", 0 tok1 byte "THEN", 0 tok2 byte "INPUT", 0 ' INPUT {"";} {,} tok3 byte "PRINT", 0 ' PRINT {USING "";} ... tok4 byte "GOTO", 0 tok5 byte "GOSUB", 0 tok6 byte "RETURN", 0 tok7 byte "REM", 0 tok8 byte "NEW", 0 tok9 byte "LIST", 0 tok10 byte "RUN", 0 tok11 byte "RND", 0 tok12 byte "OPEN", 0 ' OPEN " ", tok13 byte "READ", 0 ' READ {,} tok14 byte "WRITE", 0 ' WRITE {USING "";} ... tok15 byte "CLOSE", 0 ' CLOSE tok16 byte "DELETE", 0 ' DELETE " " tok17 byte "RENAME", 0 ' RENAME " "," " tok18 byte "FILES", 0 ' FILES tok19 byte "SAVE", 0 ' SAVE or SAVE [] or SAVE "" tok20 byte "LOAD", 0 ' LOAD or LOAD [] or LOAD "" tok21 byte "NOT" ,0 ' NOT tok22 byte "AND" ,0 ' AND tok23 byte "OR", 0 ' OR tok24 byte "SHL", 0 ' SHL tok25 byte "SHR", 0 ' SHR tok26 byte "FOR", 0 ' FOR = TO tok27 byte "TO", 0 tok28 byte "STEP", 0 ' optional STEP tok29 byte "NEXT", 0 ' NEXT tok30 byte "INA", 0 ' INA [ ] tok31 byte "OUTA", 0 ' OUTA [ ] = tok32 byte "PAUSE", 0 ' PAUSE