EMMA 02

BASIC

  • Home
  • Download
  • Change Log
  • Help
  • Compilation
    • Windows
    • OS X
    • Ubuntu
    • Fedora
    • openSUSE
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • AMVBAS
    • AM4KBAS
    • CARDTRAN
    • Chip-8, 8X, ETI-660 & Elf
    • FEL-1
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-2
    • GPL-3
    • GPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • ST2
    • ST4
    • STK
    • Test-Word
    • Super-chip
  • XML Code
    • Main Elements
    • I/O
    • System
    • A/D Convertor
    • BASIC
    • Batch wav
    • Bootstrap
    • Cassette
    • CD4536B
    • CDP1851
    • CDP1852
    • CDP1854
    • CDP1855
    • CDP1877
    • CDP1878
    • CDP1879
    • Debugger
    • COMX Diagnostic
    • Dip switch
    • Disk
    • EF Buttons
    • Flip Flop
    • Front Panel
    • GUI
    • HEX Modem
    • I/O Group
    • Keyboard
    • Keyfile
    • Locations
    • Memory
    • MM57109
    • Printer
    • RTC
    • Sound
    • Splash
    • USB
    • Video
    • Videodump
    • vt
    • X Modem
  • BASIC
    • General Information
    • COMX BASIC V1.00
    • Floating Point BASIC 2.2
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
    • Quest Super BASIC 1.4
    • Quest Super BASIC 3.0
    • Quest Super BASIC 5.0
    • Quest Super BASIC 6.0
    • RCA BASIC3 V1.1
    • Telmac SBASIC v24.3
    • Error Messages
  • Computer List

 

 

 

 

 

 

 

 

 

 

 

 

COMX BASIC V1.00

Commands

All COMX BASIC Commands including some of the start addresses of these commands are listed below. Try for example CALL (@2800)"HELLO"; this will do the same as the PRINT command. Click on the command itself to get a description of command format and usage.

ABS

@3FA5

LOG

@29A5

ASC

@28B2

MEM

@3037

ATN

@299F

MID$

 

CALL

@2C00

MOD

@1A80

CARD

@E817

MUSIC

@41CC

CHR$

 

NEW

@1A47

CLD

@2BE9

NEXT

@2F00

CLS

@321E

NOISE

@41D4

COLOR

@0BFC

NOT

@19ED

COS

@299C

PEEK

@30E8

CPOS

@0F00

PI

@24E2

CTONE

@0D63

PLOAD

@0E00

DATA

@3234

POKE

@2ABD

DEFINT

@38E4

POUT

@0DD4

DEFUS

@3EFE

PRINT / PR

@2800

DEG

@33FA

PSAVE

@1672

DIM

@2100

RAD

@33FD

DLOAD

@0E03

READ

@3D00

DOS

@0DD9 or @E817

REM

@31F9

DSAVE

@1675

RENUMBER

@221C

EDIT

@1808

RESTORE

@25F4

END

@10CC

RETURN

@2F30

EOD

@25DD

RND

@2900

EOP

@25DA

RUN

@1F76

EXIT

@32D0

RUN+

 

EXP

@29A2

SCREEN

@0BC8

FIXED

@2EE7

SGN

@2A74

FNUM

@27C1

SHAPE

@0A85

FOR TO STEP

@2300

SIN

@2999

FORMAT

@2DF3

SQR

@29A8

FVAL

@28AF

STR$

 

GOSUB

@2F3C

TAB

 

GOTO

@312A

TIME

@1600

IF THEN

@2600

TIMOUT

@0EE9

INPUT

@26C8

TONE

@41D0

INT

@1F00

TOUT

@14D4

INUM

@2B03

TRACE

@2E00

KEY

@163F

USR

@2C03

LEN

@306D

VOLUME

@0D37

LET

@2500

WAIT

@31D2

LIST

@1570

 

 

When using the expansion box the CARD statement will replace POUT, and both DOS and CARD start addresses will be @E817.

Operators

Arithmetic operators
Unary minus - (first priority)
Exponentiation ↑ (first priority)
Multiply * (second priority)
Divide / (second priority)
Add + (third priority)
Subtract - (third priority)
Assignment operator

The assignment symbol is the equal sign ‘=‘.

Relational operators

Equality: =
Inequality: ><
Greater than: >
Less than: <
Greater than or equal to: >=
Less than or equal to:<=

Logical operators

AND
XOR
OR
NOT

Miscellaneous operators
: separates statements on the same line
; PRINT delimiter
, PRINT delimiter
“ string delimiter
( group terms
) group terms
\...\ 8 bit binary values
# 8 bit hexadecimal values
@ 16 bit hexadecimal values

System Parameters

Memory @4000-@4400 in the COMX is used by the BASIC ROM for storing data, usage for some of the addresses is explained below. Some of these are also listed in the technical manual but not all.

4000 - 405F CTRL-R Buffer
4193 - 4194 Cursor position within @F800-@FFFF location
4195 - 4196 Top left screen position within @F800-@FFFF location, changes after scrolling
4197 - 4198 Cursor position, assuming top left corner = 0
419A Column counter
419B Cursor on/off (off = 0)
419D Timer on/off (off = 0)
419E - 41A0 24 bits timer value, count back to 0 if @419D != 0
41A1 - 41A2 Start address timer, a jump is needed to @054E at the end of timer routine. Usable registers: B, A and E, register 1 is program counter.
41A3 Raw keyboard value, changed after changing value to 0
41A4 Direct keyboard value
41A5 Counter for key repeat
41A6 - 41A7 Start address ESC routine
41A8 If ESC is pressed equals to #FF
41AE - 41B3 Printer Settings and info
41C0 Last value output 63
41C1 Low byte of last output 64
41C2 High byte of last output 64
41C3 Low byte of last output 65
41C4 High byte of last output 65
41CC - 41CF Call to MUSIC routine
41D0 - 41D3 Call to TONE routine
41D4 - 41D7 Call to NOISE routine
4200 - 425F Line buffer
4281 - 4282 DEFUS value
4283 - 4284 EOP (End Of Program) value
428A - 428D In hook, call to input routine
428E - 4291 Out hook, call to output routine
4292 - 4293 End array/start string value
4294 - 4295 Start array value
4296 - 4297 Line number TIMOUT
4299 - 429A EOD (End Of Data) and end string value
429B X value TAB
429D Flags
429E Start address user RAM
429F - 42A2 Call to BASIC functions
42A3 - 42A6 Call to BASIC functions
42B1 - 42B2 DATA pointer
4300 - 4368 Storage A, B, C.... Z, 4 bytes per variable