AMPLE tokens

Tony Walduck

AMPLE programs are neither stored nor executed in ASCII format, but are tokenised to save space, as are BASIC and most other languages on micros. A study of the AMPLE Nucleus ROM, and various programs and modules, has generated the following lists of AMPLE word and token equivalences.

AMPLE Nucleus tokens:

00 [ (or 'local' definition)

01 to 0A Indicates a word in an

INSTALLed or MLOADed module,

numbered by order of loading

at the time of program

definition. The normal

loading sequence is:

Studio 4000 Studio 5000

01 INT INT

02 M4 M5

03 M5 EW

04 EW MENU

05 MENU FX1A

06 FX1A INS1

07 INS1

08 KFX

This implies that a maximum of ten modules can be active at any one time.

The next number identifies the actual word within the module - see the separate tables at the end of the AMPLE Nucleus token list.

0B <space> followed by length byte (i.e. multiple spaces)

0C 1-byte decimal number follows

0D 1-byte decimal number follows with ',' implied (i.e. note length)

0E " followed by length byte, then string text (no closing " needed)

0F % followed by length byte, then comment text

10

11

12 GVAR

13 )ELSE(

14 )REP

15

16 )UNTIL(

17

18 IF(

19

1A 2-byte decimal number follows

1B 2-byte hex number follows

1C

1D

1E '

1F )P

20 ] <return>

21

22

23

24

25

26

27 PNUM

28

29

2A )IF

2B REP(

2C )ACT

2D

2E

2F

30

31

32 FOR(

33

34 INDEX

35 COUNT

36 )FOR

37

38

39 #2

3A #11

3B #12

3C #212

3D #2121

3E #213

3F #+

40 #-

41

42

43 #!

44 #B!

45 #B?

46 #?

47 SIGN

48 NOT

49 #<

4A

4B #B12

4C AND

4D OR

4E XOR

4F CODE

50 #OUT

51 <return>

52 <space>

53 EVERY

54 $+

55 $REV

56 ASC

57 LEN

58 $CHR

59

5A

5B

5C $OUT

5D NL

5E

5F $2

60

61

62

63 ^

64 X

65 /

66 ACT

67 \

68 +

69 -

6A =

6B ,

6C ;

6D FAST

6E DISPLAY

6F | (bar)

70 (

71 )

72

73

74

75

76

77

78

79

7A

7B

7C

7D

7E

7F

80

81

82

83 ARRAY

84 FCOPY

85 FVAR

86 FRAME

87 FRAME!

88 FRAME?

89 MVAL?

8A MVAL!

8B VOICE!

8C

8D ON

8E OFF

8F

90

91 #+!

92 #>

93 #=

94 MAX

95 MIN

96 $12

97 $-

98 VAL

99

9A

9B

9C

9D

9E

9F

A0

A1

A2

A3

A4 IDLE

A5 ACT(

A6 &VAL

A7 OSCLI

A8

A9

AA #*

AB #/

AC RAND

AD RAND!

AE RANDL

AF $STR

B0 &$STR

B1 NOUT

B2 &NOUT

B3 $PAD

B4 $STRIP

B5 SP

B6 ALIGN

B7 MODE

B8

B9

BA QKEY

BB 'L

BC #IN

BD $IN

BE

BF

CO UNUSED

C1 VOICE

C2 RVOICES

C3 VOICES

C4 DURATION

C5 WIND

C6 PAUSE

C7 =T

C8 -T

C9 +T

CA QTIME

CB c

CC C

CD d

CE D

CF e

D0 E

D1 f

D2 F

D3 g

D4 G

D5 a

D6 A

D7 b

D8 B

D9 K(

DA )K

DB :

DC !

DD @

DE BAR

DF ^;

E0 =L

E1 +L

E2 -L

E3 ///

E4 SIMPLEACT

E5 SCORE

E6 P(

E7 ~

E8 HALT

E9 GO

EA SHARE

EB STOP

EC

ED READY

EE

EF

F0

F1

F2

F3 DIM

F4

F5

F6

F7

F8

F9

FA

FB

FC

FD

FE

FF

Many of the unassigned tokens could be used internally in AMPLE as non-user-programmable features. Modules and parts of Nucleus itself could well be programmed in these non-documented and inaccessible parts of AMPLE.

INT definitions (preceded by module number - typically 01):

01 INT

02 METV

M4 definitions (preceded by module number - typically 02):

04 KEYS

08 KEYSET

0B KEYB

M5 definitions (preceded by module number - typically 03 or 02):

01 EVEN

02 ODD

03 PAIR

04 PSENS

05 PEN

06 AEN

07 ONEN

08 CHAN

09 CHANS

0A Simpleins

0B M5TUNE

0C GATE

0D PITCH

0E VEL

0F RM

10 SYNC

11 FM

12 SHIFT

13 OFFSET

14 AMP

15 VOL

16 POS

17 INVERT

18 PHSET

19 PITCHF

1A PAN

1B TRANS

1C DETUNE

1D M5VALS

1E M5INFO

1F M5MIX

EW definitions (preceded by module number - typically 04 or 03):

01 Hollow .....

02 Bright .

03 Broad .

04 Clear .

05 Hard .

06 High .

07 Metal ..... Waveforms

08 Pipes .

09 Reedy .

0A Round .

0B Syncer .

0C Sharp .

0D Pure .

0E Watery .....

0F Trill .....

10 Cycle .

11 Deepvib .

12 Delvib .

13 Drop .

14 Pow .

15 Ramp .

16 Rise ..... Pitch

17 Slowvib . Envelopes

18 Sweep .

19 Bend .

1A Vibrato .

1B Warble .

1C Wide .

1D Wow .

1E Zap .....

1F Burst .....

20 Short .

21 Click .

22 Tailed .

23 Echohit .

24 Verylong ..... Amplitude

25 Long . Envelopes

26 Onoff .

27 Puff .

28 Reverse .

29 Percuss .

2A Swell .

2B Soft .

2C Spike .

2D Strike .

2E Tremolo .....

2F Flat ......... Pitch Envelope

30 Peaked ......... Amplitude Envelope

MENU definitions (preceded by module number - typically 05 or 04):

01 MENUDISP

02 MENU

FX1A definitions (preceded by module number - typically 06 or 05):

01 PLAY

02 Echo

03 Len

04 Autopan

05 Slide

06 Perc

INS1 definitions (preceded by module number - typically 07 or 06):

04 Drum

05 Cymbal

06 Elguit

07 Ironpipe

08 Moog

09 Organ

0A Panflute

0B Ringsyn

0C Slapbass

0D Upright

0E Vibglock

0F Wha

10 Yakbell

11 Simpleins

KFX definitions (preceded by module number - typically 08):

01 Expand

02 Scale

03 Split

04 Spread

05 Reduce

06 KEYB

Within a program, word definitions start at byte &18. From this point the relative positions within a word definition are as follows:-

00/01 word definition length (i.e. relative pointer to next word)

02/03 possibly the absolute address of the previous word definition

04 &80+length of word name (i.e. top bit set)

05-nn ASCII for word name

nn+1 word definition number

nn+2 00, i.e. [, start of word definition

and so on to the end of that word definition, to be followed by further word definitions.

At the end of the program you will find that any modules whose words are used in the definitions are listed; each module will feature in a sequence like: -

00/01 length of sequence

02/03

04 length of used module's name

05-nn ASCII for module name

nn+1 used module's number code

It also appears from studying the modules themselves that, because of words from other modules which are used, the following module dependencies arise:

EW needs M5

INS1 needs M5 and EW

MIX needs M5

REC needs M4 and FX1A

KFX needs M5 and M4