MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

The Structure of I-Code: Difference between revisions

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
mNo edit summary
(updated lists)
Line 4: Line 4:


== I-Code Token List ==
== I-Code Token List ==
(This list is still being constructed. Some tokens have more than one meaning and use.)


{|
{|
!00
!Token !Name            !Used In      !Description
|  
! 00   |GLOBAL          |Reserved      |Global Variable
!01
! 01  |PARAM          |Editor        |
| READ
! 01   |READ           |I-Code        |File Mode 
!02
! 02   |TYPE            |Editor        |
| WRITE
! 02  |WRITE           |I-Code        |File Mode 
!03
! 03   |DIM            |Editor        |
| UPDATE
! 03  |UPDATE          |I-Code        |File Mode 
!04
! 04   |DATA           |I-Code/Editor |
| DATA
! 04  |EXEC            |I-Code        |File Mode 
!05
! 05  |STOP            |I-Code/Editor |
| STOP
! 05  |READ+EXEC      |I-Code        |File Mode 
!06
! 06  |BYE            |I-Code/Editor |
| BYE
! 06  |WRITE+EXEC      |I-Code        |File Mode 
!07
! 07  |TRON            |I-Code/Editor |
|  
! 07  |UPDATE+EXEC    |I-Code        |File Mode 
|-
! 08  |TROFF          |I-Code/Editor |
!08
! 09  |PAUSE          |I-Code/Editor |
|  
! 0A  |DEG            |I-Code/Editor |
!09
! 0B  |RAD            |I-Code/Editor |
|  
! 0C  |RETURN          |I-Code/Editor |
!0A
! 0D  |LET            |I-Code/Editor |
| DEG
! 0E  |<cva>          |I-Code/Editor |Complex Variable Assignment
!0B
! 0F  |POKE            |I-Code/Editor |
| RAD
! 10  |IF              |I-Code/Editor |
!0C
! 11  |ELSE            |I-Code/Editor |
| RETURN
! 12  |ENDIF          |I-Code/Editor |
!0D
! 13  |FOR            |I-Code/Editor |
| LET
! 14  |NEXT            |I-Code/Editor |
!0E
! 15  |WHILE          |I-Code/Editor |
|  
! 16  |ENDWHILE        |I-Code/Editor |
!0F
! 17  |REPEAT          |I-Code/Editor |
| POKE
! 18  |UNTIL          |I-Code/Editor |
|-
! 19  |LOOP            |I-Code/Editor |
!10
! 1A  |ENDLOOP        |I-Code/Editor |
| IF
! 1B  |EXITIF          |I-Code/Editor |
!11
! 1C  |ENDEXIT        |I-Code/Editor |
| ELSE
! 1D  |ON              |I-Code/Editor |
!12
! 1E  |ERROR          |I-Code/Editor |
| ENDIF
! 1F  |GOTO            |Editor        |Unbound
!13
! 20  |GOTO            |I-Code/Editor |Bound
| FOR
! 21  |GOSUB          |Editor        |Unbound
!14
! 22  |GOSUB          |I-Code/Editor |Bound
| NEXT
! 23  |RUN            |I-Code/Editor |
!15
! 24  |KILL            |I-Code/Editor |
| WHILE
! 25  |INPUT          |I-Code/Editor |
!16
! 26  |PRINT          |I-Code/Editor |? Becomes PRINT in the Editor
| ENDWHILE
! 27  |CHD            |I-Code/Editor |
!17
! 28  |CHX            |I-Code/Editor |
| REPEAT
! 29  |CREATE          |I-Code/Editor |
|-
! 2A  |OPEN            |I-Code/Editor |
!18
! 2B  |SEEK            |I-Code/Editor |
| UNTIL
! 2C  |READ            |I-Code/Editor |
!19
! 2D  |WRITE          |I-Code/Editor |
| LOOP
! 2E  |GET            |I-Code/Editor |
!1A
! 2F  |PUT            |I-Code/Editor |
| ENDLOOP
! 30  |CLOSE          |I-Code/Editor |
!1B
! 31  |RESTORE        |I-Code/Editor |
| EXITIF
! 32  |DELETE          |I-Code/Editor |
!1C
! 33  |CHAIN          |I-Code/Editor |
| ENDEXIT
! 34  |SHELL          |I-Code/Editor |
!1D
! 35  |BASE 0          |I-Code/Editor |
| ON
! 36  |BASE 1          |I-Code/Editor |
!1E
! 37  |REM            |Editor        |! Becomes REM in the Editor
| ERROR
! 38  |(*              |Editor        |
!1F
! 39  |END            |I-Code/Editor |
| GOTO
! 3A  |<ulrf>          |I-Code/Editor |Unbound Line Reference
|-
! 3B  |<blrf>          |I-Code/Editor |Bound Line Reference
!20
! 3C  |<dex>          |I-Code/Editor |Direct Execution
| GOTO
! 3D  |PROCEDURE      |Editor        |Procedure start
!21
! 3D  |<erl>          |Editor/Debug  |Error Line   
| GOSUB
! 3E  |\              |I-Code/Editor |End-of-Instruction, Continue Line
!22
! 3F  |<eol>          |I-Code/Editor |End-of-Instruction and Line
| GOSUB
! 40  |BYTE            |Editor        |
!23
! 40  |fbyte          |I-Code/Editor |VDT Entry, Field Byte Variable
| RUN
! 41  |INTEGER        |Editor        |
!24
! 41  |finteger        |I-Code/Editor |VDT Entry, Field Integer Variable
| KILL
! 42  |REAL            |Editor        |
!25
! 42  |freal          |I-Code/Editor |VDT Entry, Field Real Variable
| INPUT
! 43  |BOOLEAN        |Editor        |
!26
! 43  |fboolean        |I-Code/Editor |VDT Entry, Field Boolean Variable
| PRINT
! 44  |STRING          |Editor        |
!27
! 44  |fstring        |I-Code/Editor |VDT Entry, Field String Variable
| CHD
! 45  |THEN            |I-Code/Editor |
|-
! 45  |frecord        |I-Code/Editor |VDT Entry, Field Record Variable
!28
! 46  |TO              |I-Code/Editor |
| CHX
! 47  |STEP            |I-Code/Editor |
!29
! 48  |DO              |I-Code/Editor |
| CREATE
! 48  |fvectorb        |I-Code/Editor |VDT Entry, Field 1 Dimensional Byte Array
!2A
! 49  |USING          |I-Code/Editor |
| OPEN
! 49  |fvectori        |I-Code/Editor |VDT Entry, Field 1 Dimensional Integer Array
!2B
! 4A  |:              |I-Code/Editor |File Mode Operator
| SEEK
! 4A  |fvectorr        |I-Code/Editor |VDT Entry, Field 1 Dimensional Real Array
!2C
! 4B  |,              |I-Code/Editor |Comma Separator
| READ
! 4B  |fvectorl        |I-Code/Editor |VDT Entry, Field 1 Dimensional Boolean Array
!2D
! 4C  |:              |I-Code/Editor |Colon
| WRITE
! 4C  |fvectors        |I-Code/Editor |VDT Entry, Field 1 Dimensional String Array
!2E
! 4D  |(              |I-Code/Editor |Left Parenthesis
| GET
! 4D  |fvectoru        |I-Code/Editor |VDT Entry, Field 1 Dimensional Record Array
!2F
! 4E  |)              |I-Code/Editor |Right Parenthesis
| PUT
! 4F  |[              |I-Code/Editor |Left Bracket
|-
! 50  |]              |I-Code/Editor |Right Bracket
!30
! 50  |ftableb        |I-Code/Editor |VDT Entry, Field 2 Dimensional Byte Array
| CLOSE
! 51  |;              |I-Code/Editor |Semi-colon
!31
! 51  |ftablei        |I-Code/Editor |VDT Entry, Field 2 Dimensional Integer Array
| RESTORE
! 52  |:=              |I-Code/Editor |Assignment Operator
!32
! 52  |ftabler        |I-Code/Editor |VDT Entry, Field 2 Dimensional Real Array
| DELETE
! 53  |=              |I-Code/Editor |Assignment Operator
!33
! 53  |ftablel        |I-Code/Editor |VDT Entry, Field 2 Dimensional Boolean Array
| CHAIN
! 54  |#              |I-Code/Editor |Channel (Path) Number Operator
!34
! 54  |ftables        |I-Code/Editor |VDT Entry, Field 2 Dimensional String Array
| SHELL
! 55  |<ivgt>          |I-Code/Editor |Invisible GOTO (used with IF)
!35
! 55  |ftableu        |I-Code/Editor |VDT Entry, Field 2 Dimensional Record Array
| BASE 0
! 56  |                |Unused        |
!36
! 57  |                |Unused        |
| BASE 1
! 58  |fmatrixb        |I-Code/Editor |VDT Entry, Field 3 Dimensional Byte Array
!37
! 59  |fmatrixi        |I-Code/Editor |VDT Entry, Field 3 Dimensional Integer Array
| REM
! 5A  |fmatrixr        |I-Code/Editor |VDT Entry, Field 3 Dimensional Real Array
|-
! 5B  |fmatrixl        |I-Code/Editor |VDT Entry, Field 3 Dimensional Boolean Array
!38
! 5C  |fmatrixs        |I-Code/Editor |VDT Entry, Field 3 Dimensional String Array
| (*
! 5D  |fmatrixu        |I-Code/Editor |VDT Entry, Field 3 Dimensional Record Array
!39
! 5E  |                |Unused        |
| END
! 5F  |                |Unused        |
!3A
! 60  |byte            |I-Code/Editor |VDT entry, Byte Variable
|  
! 61  |integer        |I-Code/Editor |VDT entry, Integer Variable
!3B
! 62  |real            |I-Code/Editor |VDT entry, Real Variable
| igt2
! 63  |boolean        |I-Code/Editor |VDT entry, Boolean Variable
!3C
! 64  |string          |I-Code/Editor |VDT entry, String Variable
|  
! 65  |record          |I-Code/Editor |VDT entry, Record Variable
!3D
! 66  |                |Unused        |
|  
! 67  |                |Unused        |
!3E
! 68  |vectorb        |I-Code/Editor |VDT Entry, 1 Dimensional Byte Array
| \
! 69  |vectori        |I-Code/Editor |VDT Entry, 1 Dimensional Integer Array
!3F
! 6A  |vectorr        |I-Code/Editor |VDT Entry, 1 Dimensional Real Array
| eol
! 6B  |vectorl        |I-Code/Editor |VDT Entry, 1 Dimensional Boolean Array
|-
! 6C  |vectors        |I-Code/Editor |VDT Entry, 1 Dimensional String Array
!40
! 6D  |vectoru        |I-Code/Editor |VDT Entry, 1 Dimensional Record Array
|  
! 6E  |                |Unused        |
!41
! 6F  |                |Unused        |
|  
! 70  |tableb          |I-Code/Editor |VDT Entry, 2 Dimensional Byte Array
!42
! 71  |tablei          |I-Code/Editor |VDT Entry, 2 Dimensional Integer Array
|  
! 72  |tabler          |I-Code/Editor |VDT Entry, 2 Dimensional Real Array
!43
! 73  |tablel          |I-Code/Editor |VDT Entry, 2 Dimensional Boolean Array
|  
! 74  |tables          |I-Code/Editor |VDT Entry, 2 Dimensional String Array
!44
! 75  |tableu          |I-Code/Editor |VDT Entry, 2 Dimensional Record Array
|  
! 76  |                |Unused        |
!45
! 77  |                |Unused        |
| THEN
! 78  |matrixb        |I-Code/Editor |VDT Entry, 3 Dimensional Byte Array
!46
! 79  |matrixi        |I-Code/Editor |VDT Entry, 3 Dimensional Integer Array
| TO
! 7A  |matrixr        |I-Code/Editor |VDT Entry, 3 Dimensional Real Array
!47
! 7B  |matrixl        |I-Code/Editor |VDT Entry, 3 Dimensional Boolean Array
| STEP
! 7C  |matrixs        |I-Code/Editor |VDT Entry, 3 Dimensional String Array
|-
! 7D  |matrixu        |I-Code/Editor |VDT Entry, 3 Dimensional Record Array
!48
! 7E  |                |Unused        |
| DO
! 7F  |                |Unused        |
!49
! 80  |byte            |I-Code/Editor |Instruction, Simple Byte Variable
| USING
! 80  |pbyte          |I-Code/Editor |VDT Entry, Parameter Byte Variable
!4A
! 80  |DIR            |I-Code        |File Mode 
| :
! 81  |integer        |I-Code/Editor |Instruction, Simple Integer Variable
!4B
! 81  |pinteger        |I-Code/Editor |VDT Entry, Parameter Integer Variable
| ,
! 81  |READ+DIR        |I-Code        |File Mode       
!4C
! 82  |real            |I-Code/Editor |Instruction, Simple Real Variable
|  
! 82  |preal          |I-Code/Editor |VDT Entry, Parameter Real Variable
!4D
! 82  |WRITE+DIR      |I-Code        |File Mode       
| (
! 83  |boolean        |I-Code/Editor |Instruction, Simple Boolean Variable
!4E
! 83  |pboolean        |I-Code/Editor |VDT Entry, Parameter Boolean Variable
| )
! 83  |UPDATE+DIR      |I-Code        |File Mode       
!4F
! 84  |string          |I-Code/Editor |Instruction, Simple String Variable
|  
! 84  |pstring        |I-Code/Editor |VDT Entry, Parameter String Variable
|-
! 84  |EXEC+DIR        |I-Code        |File Mode       
!50
! 85  |record/p        |I-Code/Editor |Instruction, Record, Parameter (Simple/Record) Variable
|  
! 85  |vector/p        |I-Code/Editor |Instruction, 1 Dimensional Array, Parameter 1 Dimensional Array Variable
!51
! 85  |table/p        |I-Code/Editor |Instruction, 2 Dimensional Array, Parameter 2 Dimensional Array Variable
| ;
! 85  |matrix/p        |I-Code/Editor |Instruction, 3 Dimensional Array, Parameter 3 Dimensional Array Variable
!52
! 85  |precord        |I-Code/Editor |VDT Entry, Parameter Record Variable
| :=
! 85  |READ+EXEC+DIR  |I-Code        |File Mode       
!53
! 86  |vector/p        |I-Code/Editor |Instruction, 1 Dimensional Array
| =
! 86  |WRITE+EXEC+DIR  |I-Code        |File Mode       
!54
! 87  |table/p        |I-Code/Editor |Instruction, 2 Dimensional Array
| #
! 87  |UPDATE+EXEC+DIR |I-Code        |File Mode       
!55
! 88  |matrix/p        |I-Code/Editor |Instruction, 3 Dimensional Array
| igt1
! 88  |pvectorb        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Byte Array
!56
! 89  |varm            |I-Code/Editor |Instruction, Simple/Record Variable Mirror
|  
! 89  |pvectori        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Integer Array
!57
! 8A  |fvectorm        |I-Code/Editor |VDT Entry, Field 1 Dimensional Array Mirror
|  
! 8A  |pvectorr        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Real Array
|-
! 8B  |ftablem        |I-Code/Editor |VDT Entry, Field 2 Dimensional Array Mirror
!58
! 8B  |pvectorl        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Boolean Array
|  
! 8C  |fmatrixm        |I-Code/Editor |VDT Entry, Field 3 Dimensional Array Mirror
!59
! 8C  |pvectors        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional String Array
|  
! 8D  |<blit>         |I-Code/Editor |BYTE Constant (Literal)
!5A
! 8D  |pvectoru        |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Record Array
|  
! 8E  |<ilit>         |I-Code/Editor |INTEGER Constant (Literal)
!5B
! 8F  |<rlit>          |I-Code/Editor |REAL Constant (Literal)
|  
! 90  |"              |I-Code/Editor |STRING Constant - Beginning (Literal)
!5C
! 90  |ptableb        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Byte Array
|  
! 91  |$              |I-Code/Editor |Hexadecimal Constant (Literal)
!5D
! 91  |ptablei        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Integer Array
|  
! 92  |ADDR()          |I-Code/Editor |
!5E
! 92  |ptabler        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Real Array
|  
! 93  |                |I-Code/Editor |Second Byte of ADDR()
!5F
! 93  |ptablel        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Boolean Array
|  
! 94  |SIZE()          |I-Code/Editor |
|-
! 94  |ptables        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional String Array
!60
! 95  |               |I-Code/Editor |Second Byte of SIZE()   
|  
! 95  |ptableu        |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Record Array
!61
! 96  |POS()          |I-Code/Editor |
|  
! 97  |ERR()          |I-Code/Editor |
!62
! 98  |MOD()          |I-Code/Editor |Byte/Integer
|  
! 98  |pmatrixb        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Byte Array
!63
! 99  |MOD()          |I-Code/Editor |Real
|  
! 99  |pmatrixi        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Integer Array
!64
! 9A  |RND()          |I-Code/Editor |
|  
! 9A  |pmatrixr        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Real Array
!65
! 9B  |PI              |I-Code/Editor |
|  
! 9B  |pmatrixl        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Boolean Array
!66
! 9C  |SUBSTR()        |I-Code/Editor |
|  
! 9C  |pmatrixs        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional String Array
!67
! 9D  |SGN()          |I-Code/Editor |
|  
! 9D  |pmatrixu        |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Record Array
|-
! 9E  |SGN()          |I-Code/Editor |
!68
! 9F  |SIN()          |I-Code/Editor |
|  
! A0  |COS()          |I-Code/Editor |
!69
! A0  |<subr>          |I-Code/Editor |Called Subroutine Name
|  
! A1  |TAN()          |I-Code/Editor |
!6A
! A2  |ASN()          |I-Code/Editor |
|  
! A3  |ACS()          |I-Code/Editor |
!6B
! A4  |ATN()          |I-Code/Editor |
|  
! A5  |EXP()          |I-Code/Editor |
!6C
! A6  |ABS()          |I-Code/Editor |
|  
! A7  |ABS()          |I-Code/Editor |
!6D
! A8  |LOG()          |I-Code/Editor |
|  
! A9  |LOG10()        |I-Code/Editor |
!6E
! AA  |SQRT()          |I-Code/Editor |
|  
! AB  |SQR()          |I-Code/Editor |Becomes SQRT() in the Code
!6F
! AC  |INT()          |I-Code/Editor |Byte/Integer
|  
! AD  |INT()          |I-Code/Editor |Real
|-
! AE  |FIX()          |I-Code/Editor |Byte/Integer
!70
! AF  |FIX()          |I-Code/Editor |Real
|  
! B0  |FLOAT()        |I-Code/Editor |Byte/Integer
!71
! B1  |FLOAT()        |I-Code/Editor |Real
|  
! B2  |SQ()            |I-Code/Editor |Byte/Integer
!72
! B3  |SQ()            |I-Code/Editor |Real
|  
! B4  |PEEK()          |I-Code/Editor |
!73
! B5  |LNOT()          |I-Code/Editor |Logical NOT
|  
! B6  |VAL()          |I-Code/Editor |
!74
! B7  |LEN()          |I-Code/Editor |
|  
! B8  |ASC()          |I-Code/Editor |
!75
! B9  |LAND()          |I-Code/Editor |Logical AND
|  
! BA  |LOR()          |I-Code/Editor |Logical OR
!76
! BB  |LXOR()          |I-Code/Editor |Logical XOR
|  
! BC  |TRUE            |I-Code/Editor |
!77
! BD  |FALSE          |I-Code/Editor |
|  
! BE  |EOF()          |I-Code/Editor |
|-
! BF  |TRIM$()        |I-Code/Editor |
!78
! C0  |MID$()          |I-Code/Editor |
|  
! C1  |LEFT$()        |I-Code/Editor |
!79
! C2  |RIGHT$()        |I-Code/Editor |
|  
! C3  |CHR$()          |I-Code/Editor |
!7A
! C4  |STR$()          |I-Code/Editor |Byte/Integer
|  
! C5  |STR$()          |I-Code/Editor |Real
!7B
! C6  |DATE$          |I-Code/Editor |
|  
! C7  |TAB            |I-Code/Editor |
!7C
! C8  |<ritc>          |I-Code/Editor |Real->Byte/Integer Type Conversion
|  
! C8  |<fix1>          |I-Code/Editor |Fix Top of Stack
!7D
! C9  |<fix2>          |I-Code/Editor |Fix Second on Stack
|  
! CA  |<fix3>          |I-Code/Editor |Fix Third on Stack
!7E
! CB  |<irtc>          |I-Code/Editor |Byte/Integer->Real Type Conversion
|  
! CB  |<flt1>          |I-Code/Editor |Float Top of Stack
!7F
! CC  |<flt2>          |I-Code/Editor |Float Second on Stack
|  
! CD  |NOT()          |I-Code/Editor |
|-
! CE  |-              |I-Code/Editor |(Monadic) Negate Byte/Integer
!80
! CF  |-              |I-Code/Editor |(Monadic) Negate Real
| BYTE
! D0  |AND            |I-Code/Editor |
!81
! D1  |OR              |I-Code/Editor |
| INTEGER
! D2  |XOR            |I-Code/Editor |
!82
! D3  |>              |I-Code/Editor |Byte/Integer Comparison Operator
| REAL
! D4  |>              |I-Code/Editor |Real        Comparison Operator
!83
! D5  |>              |I-Code/Editor |String      Comparison Operator
| BOOLEAN
! D6  |<              |I-Code/Editor |Byte/Integer Comparison Operator
!84
! D7  |<              |I-Code/Editor |Real        Comparison Operator
| STRING
! D8  |<              |I-Code/Editor |String      Comparison Operator
!85
! D9  |<>              |I-Code/Editor |Byte/Integer Comparison Operator >< is converted to <> in the code
| udv
! DA  |<>              |I-Code/Editor |Real        Comparison Operator >< is converted to <> in the code
!86
! DB  |<>              |I-Code/Editor |String      Comparison Operator >< is converted to <> in the code
| 1dim
! DC  |<>              |I-Code/Editor |Boolean      Comparison Operator >< is converted to <> in the code
!87
! DD  |=              |I-Code/Editor |Byte/Integer Comparison Operator
| 2dim
! DE  |=              |I-Code/Editor |Real        Comparison Operator
|-
! DF  |=              |I-Code/Editor |String      Comparison Operator
!88
! E0  |=              |I-Code/Editor |Boolean      Comparison Operator
| 3dim
! E1  |>=              |I-Code/Editor |Byte/Integer Greater/Equal Operator
!89
! E2  |>=              |I-Code/Editor |Real        Greater/Equal Operator
| udtv
! E3  |>=              |I-Code/Editor |String      Greater/Equal Operator
!8A
! E4  |<=              |I-Code/Editor |Byte/Integer Less/Equal Operator
|  
! E5  |<=              |I-Code/Editor |Real        Less/Equal Operator
!8B
! E6  |<=              |I-Code/Editor |String      Less/Equal Operator
|  
! E7  |+              |I-Code/Editor |Byte/Integer Add Operator
!8C
! E8  |+              |I-Code/Editor |Real        Add Operator
|  
! E9  |+              |I-Code/Editor |String      Concantenate Operator
!8D
! EA  |-              |I-Code/Editor |Byte/Integer Subtract Operator (Dyadic)
| bc
! EB  |-              |I-Code/Editor |Real        Subtract Operator (Dyadic)
!8E
! EC  |*              |I-Code/Editor |Byte/Integer Multiply Operator
| ic
! ED  |*              |I-Code/Editor |Real        Multiply Operator
!8F
! EE  |/              |I-Code/Editor |Byte/Integer Divide Operator
| rc
! EF  |/              |I-Code/Editor |Real        Divide Operator
|-
! F0  |^              |I-Code/Editor |Exponent Operator
!90
! F1  |**              |I-Code/Editor |Exponent Operator
| "
! F2  |varm/p          |I-Code/Editor |Instruction, Simple/Record, Parameter Variable Mirror
!91
! F3  |vectorm/p      |I-Code/Editor |Instruction, 1 Dimensional Array, Parameter 1 Dimensional Array Mirror
| $
! F4  |tablem/p        |I-Code/Editor |Instruction, 2 Dimensional Array, Parameter 2 Dimensional Array Mirror
!92
! F5  |matrixm/p      |I-Code/Editor |Instruction, 3 Dimensional Array, Parameter 3 Dimensional Array Mirror
| ADDR()
! F6  |field          |I-Code/Editor |Instruction, Field Variable
!93
! F7  |UPDATE          |Editor        |
|  
! F7  |fvector        |I-Code/Editor |Instruction, Field 1 Dimensional Array
!94
! F8  |EXEC            |Editor        |
| SIZE()
! F8  |ftable          |I-Code/Editor |Instruction, Field 2 Dimensional Array
!95
! F9  |DIR             |Editor        |
| SIZE()
! F9  |fmatrix        |I-Code/Editor |Instruction, Field 3 Dimensional Array
!96
! FA  |                |Unused        |
| POS()
! FB  |                |Unused        |
!97
! FC  |                |Unused        |
| ERR
! FD  |                |Unused        |
|-
! FE  |                |Unused        |
!98
! FF  |"              |I-Code/Editor |STRING Constant - Terminator
| MOD(,)
!99
| MOD(,)
!9A
| RND()
!9B
| PI
!9C
| SUBSTR(,)
!9D
| SGN()
!9E
| SGN()
!9F
| SIN()
|-
!A0
| COS()
!A1
| TAN()
!A2
| ASN()
!A3
| ACS()
!A4
| ATN()
!A5
| EXP()
!A6
| ABS()
!A7
| ABS()
|-
!A8
| LOG()
!A9
| LOG10()
!AA
| SQRT()
!AB
|  
!AC
| INT()
!AD
| INT()
!AE
| FIX()
!AF
| FIX()
|-
!B0
| FLOAT()
!B1
| FLOAT()
!B2
| SQ()
!B3
| SQ()
!B4
| PEEK()
!B5
| LNOT()
!B6
| VAL()
!B7
| LEN()
|-
!B8
| ASC()
!B9
| LAND(,)
!BA
| LOR(,)
!BB
| LXOR(,)
!BC
| TRUE
!BD
| FALSE
!BE
| EOF()
!BF
| TRIM$()
|-
!C0
| MID$(,,)
!C1
| LEFT$(,)
!C2
| RIGHT$(,)
!C3
| CHR$()
!C4
| STR$()
!C5
| STR$()
!C6
| DATE$
!C7
| TAB
|-
!C8
| ritc
!C9
|  
!CA
|  
!CB
| irtc
!CC
|  
!CD
| NOT()
!CE
|  
!CF
|  
|-
!D0
| AND
!D1
| OR
!D2
| XOR
!D3
| >
!D4
| >
!D5
| >
!D6
| <
!D7
| <
|-
!D8
| <
!D9
| <>
!DA
| <>
!DB
| <>
!DC
| <>
!DD
| =
!DE
| =
!DF
| =
|-
!E0
| =
!E1
| >=
!E2
| >=
!E3
| >=
!E4
| <=
!E5
| <=
!E6
| <=
!E7
| +
|-
!E8
| +
!E9
| +
!EA
| -
!EB
| -
!EC
| *
!ED
| *
!EE
| /
!EF
| /
|-
!F0
| ^
!F1
| **
!F2
| avt
!F3
| 1dim
!F4
| 2dim
!F5
| 3dim
!F6
| udtv
!F7
| UPDATE
|-
!F8
| EXEC
!F9
| DIR
!FA
|  
!FB
|  
!FC
|  
!FD
|  
!FE
|  
!FF
| "
|-
!
|
|-
!00
|  
!01
| PARAM
!02
| TYPE
!03
| DIM
!04
| READ+EXEC
!05
| WRITE+EXEC
!06
| UPDATE+EXEC
|-
!3D
| PROCEDURE
!81
| READ+DIR
!82
| WRITE+DIR
!83
| UPDATE+DIR
|}
|}

Revision as of 20:52, 27 June 2013

The 'I' in I-Code stands for Intermediate. Intermediate code is code that is a step between interpreted source statements and fully compiled machine code. Typically, intermediate code uses tokens to represent the instructions to be executed. Basic09 I-Code goes a step further by re-arranging the source code instructions in post-fix notation (also known as Reverse Polish Notation) order.

The tokens used by Basic09 are a single byte ranging from $00 to $FF. The table below defines the tokens.

I-Code Token List

Token !Name !Used In !Description GLOBAL |Reserved |Global Variable PARAM |Editor | READ |I-Code |File Mode TYPE |Editor | WRITE |I-Code |File Mode DIM |Editor | UPDATE |I-Code |File Mode DATA |I-Code/Editor | EXEC |I-Code |File Mode STOP |I-Code/Editor | READ+EXEC |I-Code |File Mode BYE |I-Code/Editor | WRITE+EXEC |I-Code |File Mode TRON |I-Code/Editor | UPDATE+EXEC |I-Code |File Mode TROFF |I-Code/Editor | PAUSE |I-Code/Editor | DEG |I-Code/Editor | RAD |I-Code/Editor | RETURN |I-Code/Editor | LET |I-Code/Editor | <cva> |I-Code/Editor |Complex Variable Assignment POKE |I-Code/Editor | IF |I-Code/Editor | ELSE |I-Code/Editor | ENDIF |I-Code/Editor | FOR |I-Code/Editor | NEXT |I-Code/Editor | WHILE |I-Code/Editor | ENDWHILE |I-Code/Editor | REPEAT |I-Code/Editor | UNTIL |I-Code/Editor | LOOP |I-Code/Editor | ENDLOOP |I-Code/Editor | EXITIF |I-Code/Editor | ENDEXIT |I-Code/Editor | ON |I-Code/Editor | ERROR |I-Code/Editor | GOTO |Editor |Unbound GOTO |I-Code/Editor |Bound GOSUB |Editor |Unbound GOSUB |I-Code/Editor |Bound RUN |I-Code/Editor | KILL |I-Code/Editor | INPUT |I-Code/Editor | PRINT |I-Code/Editor |? Becomes PRINT in the Editor CHD |I-Code/Editor | CHX |I-Code/Editor | CREATE |I-Code/Editor | OPEN |I-Code/Editor | SEEK |I-Code/Editor | READ |I-Code/Editor | WRITE |I-Code/Editor | GET |I-Code/Editor | PUT |I-Code/Editor | CLOSE |I-Code/Editor | RESTORE |I-Code/Editor | DELETE |I-Code/Editor | CHAIN |I-Code/Editor | SHELL |I-Code/Editor | BASE 0 |I-Code/Editor | BASE 1 |I-Code/Editor | REM |Editor |! Becomes REM in the Editor (* |Editor | END |I-Code/Editor | <ulrf> |I-Code/Editor |Unbound Line Reference <blrf> |I-Code/Editor |Bound Line Reference <dex> |I-Code/Editor |Direct Execution PROCEDURE |Editor |Procedure start <erl> |Editor/Debug |Error Line \ |I-Code/Editor |End-of-Instruction, Continue Line <eol> |I-Code/Editor |End-of-Instruction and Line BYTE |Editor | fbyte |I-Code/Editor |VDT Entry, Field Byte Variable INTEGER |Editor | finteger |I-Code/Editor |VDT Entry, Field Integer Variable REAL |Editor | freal |I-Code/Editor |VDT Entry, Field Real Variable BOOLEAN |Editor | fboolean |I-Code/Editor |VDT Entry, Field Boolean Variable STRING |Editor | fstring |I-Code/Editor |VDT Entry, Field String Variable THEN |I-Code/Editor | frecord |I-Code/Editor |VDT Entry, Field Record Variable TO |I-Code/Editor | STEP |I-Code/Editor | DO |I-Code/Editor | fvectorb |I-Code/Editor |VDT Entry, Field 1 Dimensional Byte Array USING |I-Code/Editor | fvectori |I-Code/Editor |VDT Entry, Field 1 Dimensional Integer Array : |I-Code/Editor |File Mode Operator fvectorr |I-Code/Editor |VDT Entry, Field 1 Dimensional Real Array , |I-Code/Editor |Comma Separator fvectorl |I-Code/Editor |VDT Entry, Field 1 Dimensional Boolean Array : |I-Code/Editor |Colon fvectors |I-Code/Editor |VDT Entry, Field 1 Dimensional String Array ( |I-Code/Editor |Left Parenthesis fvectoru |I-Code/Editor |VDT Entry, Field 1 Dimensional Record Array ) |I-Code/Editor |Right Parenthesis [ |I-Code/Editor |Left Bracket ] |I-Code/Editor |Right Bracket ftableb |I-Code/Editor |VDT Entry, Field 2 Dimensional Byte Array ; |I-Code/Editor |Semi-colon ftablei |I-Code/Editor |VDT Entry, Field 2 Dimensional Integer Array := |I-Code/Editor |Assignment Operator ftabler |I-Code/Editor |VDT Entry, Field 2 Dimensional Real Array = |I-Code/Editor |Assignment Operator ftablel |I-Code/Editor |VDT Entry, Field 2 Dimensional Boolean Array # |I-Code/Editor |Channel (Path) Number Operator ftables |I-Code/Editor |VDT Entry, Field 2 Dimensional String Array <ivgt> |I-Code/Editor |Invisible GOTO (used with IF) ftableu |I-Code/Editor |VDT Entry, Field 2 Dimensional Record Array |Unused | |Unused | fmatrixb |I-Code/Editor |VDT Entry, Field 3 Dimensional Byte Array fmatrixi |I-Code/Editor |VDT Entry, Field 3 Dimensional Integer Array fmatrixr |I-Code/Editor |VDT Entry, Field 3 Dimensional Real Array fmatrixl |I-Code/Editor |VDT Entry, Field 3 Dimensional Boolean Array fmatrixs |I-Code/Editor |VDT Entry, Field 3 Dimensional String Array fmatrixu |I-Code/Editor |VDT Entry, Field 3 Dimensional Record Array |Unused | |Unused | byte |I-Code/Editor |VDT entry, Byte Variable integer |I-Code/Editor |VDT entry, Integer Variable real |I-Code/Editor |VDT entry, Real Variable boolean |I-Code/Editor |VDT entry, Boolean Variable string |I-Code/Editor |VDT entry, String Variable record |I-Code/Editor |VDT entry, Record Variable |Unused | |Unused | vectorb |I-Code/Editor |VDT Entry, 1 Dimensional Byte Array vectori |I-Code/Editor |VDT Entry, 1 Dimensional Integer Array vectorr |I-Code/Editor |VDT Entry, 1 Dimensional Real Array vectorl |I-Code/Editor |VDT Entry, 1 Dimensional Boolean Array vectors |I-Code/Editor |VDT Entry, 1 Dimensional String Array vectoru |I-Code/Editor |VDT Entry, 1 Dimensional Record Array |Unused | |Unused | tableb |I-Code/Editor |VDT Entry, 2 Dimensional Byte Array tablei |I-Code/Editor |VDT Entry, 2 Dimensional Integer Array tabler |I-Code/Editor |VDT Entry, 2 Dimensional Real Array tablel |I-Code/Editor |VDT Entry, 2 Dimensional Boolean Array tables |I-Code/Editor |VDT Entry, 2 Dimensional String Array tableu |I-Code/Editor |VDT Entry, 2 Dimensional Record Array |Unused | |Unused | matrixb |I-Code/Editor |VDT Entry, 3 Dimensional Byte Array matrixi |I-Code/Editor |VDT Entry, 3 Dimensional Integer Array matrixr |I-Code/Editor |VDT Entry, 3 Dimensional Real Array matrixl |I-Code/Editor |VDT Entry, 3 Dimensional Boolean Array matrixs |I-Code/Editor |VDT Entry, 3 Dimensional String Array matrixu |I-Code/Editor |VDT Entry, 3 Dimensional Record Array |Unused | |Unused | byte |I-Code/Editor |Instruction, Simple Byte Variable pbyte |I-Code/Editor |VDT Entry, Parameter Byte Variable DIR |I-Code |File Mode integer |I-Code/Editor |Instruction, Simple Integer Variable pinteger |I-Code/Editor |VDT Entry, Parameter Integer Variable READ+DIR |I-Code |File Mode real |I-Code/Editor |Instruction, Simple Real Variable preal |I-Code/Editor |VDT Entry, Parameter Real Variable WRITE+DIR |I-Code |File Mode boolean |I-Code/Editor |Instruction, Simple Boolean Variable pboolean |I-Code/Editor |VDT Entry, Parameter Boolean Variable UPDATE+DIR |I-Code |File Mode string |I-Code/Editor |Instruction, Simple String Variable pstring |I-Code/Editor |VDT Entry, Parameter String Variable EXEC+DIR |I-Code |File Mode record/p |I-Code/Editor |Instruction, Record, Parameter (Simple/Record) Variable vector/p |I-Code/Editor |Instruction, 1 Dimensional Array, Parameter 1 Dimensional Array Variable table/p |I-Code/Editor |Instruction, 2 Dimensional Array, Parameter 2 Dimensional Array Variable matrix/p |I-Code/Editor |Instruction, 3 Dimensional Array, Parameter 3 Dimensional Array Variable precord |I-Code/Editor |VDT Entry, Parameter Record Variable READ+EXEC+DIR |I-Code |File Mode vector/p |I-Code/Editor |Instruction, 1 Dimensional Array WRITE+EXEC+DIR |I-Code |File Mode table/p |I-Code/Editor |Instruction, 2 Dimensional Array UPDATE+EXEC+DIR |I-Code |File Mode matrix/p |I-Code/Editor |Instruction, 3 Dimensional Array pvectorb |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Byte Array varm |I-Code/Editor |Instruction, Simple/Record Variable Mirror pvectori |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Integer Array fvectorm |I-Code/Editor |VDT Entry, Field 1 Dimensional Array Mirror pvectorr |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Real Array ftablem |I-Code/Editor |VDT Entry, Field 2 Dimensional Array Mirror pvectorl |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Boolean Array fmatrixm |I-Code/Editor |VDT Entry, Field 3 Dimensional Array Mirror pvectors |I-Code/Editor |VDT Entry, Parameter 1 Dimensional String Array <blit> |I-Code/Editor |BYTE Constant (Literal) pvectoru |I-Code/Editor |VDT Entry, Parameter 1 Dimensional Record Array <ilit> |I-Code/Editor |INTEGER Constant (Literal) <rlit> |I-Code/Editor |REAL Constant (Literal) " |I-Code/Editor |STRING Constant - Beginning (Literal) ptableb |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Byte Array $ |I-Code/Editor |Hexadecimal Constant (Literal) ptablei |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Integer Array ADDR() |I-Code/Editor | ptabler |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Real Array |I-Code/Editor |Second Byte of ADDR() ptablel |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Boolean Array SIZE() |I-Code/Editor | ptables |I-Code/Editor |VDT Entry, Parameter 2 Dimensional String Array |I-Code/Editor |Second Byte of SIZE() ptableu |I-Code/Editor |VDT Entry, Parameter 2 Dimensional Record Array POS() |I-Code/Editor | ERR() |I-Code/Editor | MOD() |I-Code/Editor |Byte/Integer pmatrixb |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Byte Array MOD() |I-Code/Editor |Real pmatrixi |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Integer Array RND() |I-Code/Editor | pmatrixr |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Real Array PI |I-Code/Editor | pmatrixl |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Boolean Array SUBSTR() |I-Code/Editor | pmatrixs |I-Code/Editor |VDT Entry, Parameter 3 Dimensional String Array SGN() |I-Code/Editor | pmatrixu |I-Code/Editor |VDT Entry, Parameter 3 Dimensional Record Array SGN() |I-Code/Editor | SIN() |I-Code/Editor | COS() |I-Code/Editor | <subr> |I-Code/Editor |Called Subroutine Name TAN() |I-Code/Editor | ASN() |I-Code/Editor | ACS() |I-Code/Editor | ATN() |I-Code/Editor | EXP() |I-Code/Editor | ABS() |I-Code/Editor | ABS() |I-Code/Editor | LOG() |I-Code/Editor | LOG10() |I-Code/Editor | SQRT() |I-Code/Editor | SQR() |I-Code/Editor |Becomes SQRT() in the Code INT() |I-Code/Editor |Byte/Integer INT() |I-Code/Editor |Real FIX() |I-Code/Editor |Byte/Integer FIX() |I-Code/Editor |Real FLOAT() |I-Code/Editor |Byte/Integer FLOAT() |I-Code/Editor |Real SQ() |I-Code/Editor |Byte/Integer SQ() |I-Code/Editor |Real PEEK() |I-Code/Editor | LNOT() |I-Code/Editor |Logical NOT VAL() |I-Code/Editor | LEN() |I-Code/Editor | ASC() |I-Code/Editor | LAND() |I-Code/Editor |Logical AND LOR() |I-Code/Editor |Logical OR LXOR() |I-Code/Editor |Logical XOR TRUE |I-Code/Editor | FALSE |I-Code/Editor | EOF() |I-Code/Editor | TRIM$() |I-Code/Editor | MID$() |I-Code/Editor | LEFT$() |I-Code/Editor | RIGHT$() |I-Code/Editor | CHR$() |I-Code/Editor | STR$() |I-Code/Editor |Byte/Integer STR$() |I-Code/Editor |Real DATE$ |I-Code/Editor | TAB |I-Code/Editor | <ritc> |I-Code/Editor |Real->Byte/Integer Type Conversion <fix1> |I-Code/Editor |Fix Top of Stack <fix2> |I-Code/Editor |Fix Second on Stack <fix3> |I-Code/Editor |Fix Third on Stack <irtc> |I-Code/Editor |Byte/Integer->Real Type Conversion <flt1> |I-Code/Editor |Float Top of Stack <flt2> |I-Code/Editor |Float Second on Stack NOT() |I-Code/Editor | - |I-Code/Editor |(Monadic) Negate Byte/Integer - |I-Code/Editor |(Monadic) Negate Real AND |I-Code/Editor | OR |I-Code/Editor | XOR |I-Code/Editor | > |I-Code/Editor |Byte/Integer Comparison Operator > |I-Code/Editor |Real Comparison Operator > |I-Code/Editor |String Comparison Operator < |I-Code/Editor |Byte/Integer Comparison Operator < |I-Code/Editor |Real Comparison Operator < |I-Code/Editor |String Comparison Operator <> |I-Code/Editor |Byte/Integer Comparison Operator >< is converted to <> in the code <> |I-Code/Editor |Real Comparison Operator >< is converted to <> in the code <> |I-Code/Editor |String Comparison Operator >< is converted to <> in the code <> |I-Code/Editor |Boolean Comparison Operator >< is converted to <> in the code = |I-Code/Editor |Byte/Integer Comparison Operator = |I-Code/Editor |Real Comparison Operator = |I-Code/Editor |String Comparison Operator = |I-Code/Editor |Boolean Comparison Operator >= |I-Code/Editor |Byte/Integer Greater/Equal Operator >= |I-Code/Editor |Real Greater/Equal Operator >= |I-Code/Editor |String Greater/Equal Operator <= |I-Code/Editor |Byte/Integer Less/Equal Operator <= |I-Code/Editor |Real Less/Equal Operator <= |I-Code/Editor |String Less/Equal Operator + |I-Code/Editor |Byte/Integer Add Operator + |I-Code/Editor |Real Add Operator + |I-Code/Editor |String Concantenate Operator - |I-Code/Editor |Byte/Integer Subtract Operator (Dyadic) - |I-Code/Editor |Real Subtract Operator (Dyadic) * |I-Code/Editor |Byte/Integer Multiply Operator * |I-Code/Editor |Real Multiply Operator / |I-Code/Editor |Byte/Integer Divide Operator / |I-Code/Editor |Real Divide Operator ^ |I-Code/Editor |Exponent Operator ** |I-Code/Editor |Exponent Operator varm/p |I-Code/Editor |Instruction, Simple/Record, Parameter Variable Mirror vectorm/p |I-Code/Editor |Instruction, 1 Dimensional Array, Parameter 1 Dimensional Array Mirror tablem/p |I-Code/Editor |Instruction, 2 Dimensional Array, Parameter 2 Dimensional Array Mirror matrixm/p |I-Code/Editor |Instruction, 3 Dimensional Array, Parameter 3 Dimensional Array Mirror field |I-Code/Editor |Instruction, Field Variable UPDATE |Editor | fvector |I-Code/Editor |Instruction, Field 1 Dimensional Array EXEC |Editor | ftable |I-Code/Editor |Instruction, Field 2 Dimensional Array DIR |Editor | fmatrix |I-Code/Editor |Instruction, Field 3 Dimensional Array |Unused | |Unused | |Unused | |Unused | |Unused | " |I-Code/Editor |STRING Constant - Terminator