
             Edinburgh IMP77 Compiler - Version 8.4


        LANG 0000
        PUSHI #0x00000000
        DEF V_0001 NIL  record, name, format=0, constant
        INIT 1
        DEF V_0002 REM  integer, function, format=1, prim-spec-indirect
        START
        DEF V_0003 P  integer, simple, format=1, 0
        DEF V_0004 Q  integer, simple, format=1, 0
        FINISH
        DEF V_0003 FLOAT  real, function, format=1, prim-spec-indirect
        START
        DEF V_0004 N  integer, simple, format=1, 0
        FINISH
        DEF V_0004 TOSTRING  string, function, format=1, prim-spec-indirect
        START
        DEF V_0005 C  integer, simple, format=1, 0
        FINISH
        DEF V_0005 ADDR  integer, function, format=1, prim-spec-indirect
        START
        DEF V_0006 P  type=0, name, format=0, 0
        FINISH
        DEF V_0006 INTEGER  integer, map, format=1, prim-spec
        START
        DEF V_0007 N  integer, simple, format=1, 0
        FINISH
        DEF V_0007 BYTEINTEGER  byte-integer, map, format=2, prim-spec
        START
        DEF V_0008 N  integer, simple, format=1, 0
        FINISH
        DEF V_0008 STRING  string, map, format=0, prim-spec
        START
        DEF V_0009 N  integer, simple, format=1, 0
        FINISH
        DEF V_0009 RECORD  record, map, format=0, prim-spec
        START
        DEF V_000a N  integer, simple, format=1, 0
        FINISH
        DEF V_000a REAL  real, map, format=1, prim-spec
        START
        DEF V_000b N  integer, simple, format=1, 0
        FINISH
        DEF V_000b LONGREAL  long-real, map, format=4, prim-spec
        START
        DEF V_000c N  integer, simple, format=1, 0
        FINISH
        DEF V_000c LENGTH  byte-integer, map, format=2, prim-spec
        START
        DEF V_000d S  string, simple, format=255, 0
        FINISH
        DEF V_000d CHARNO  byte-integer, map, format=2, prim-spec
        START
        DEF V_000e S  string, simple, format=255, 0
        DEF V_000f N  integer, simple, format=1, 0
        FINISH
        DEF V_000e INT  integer, function, format=1, prim-spec-indirect
        START
        DEF V_000f R  long-real, simple, format=4, 0
        FINISH
        DEF V_000f SHORTINTEGER  short-integer, map, format=3, prim-spec
        START
        DEF V_0010 N  integer, simple, format=1, 0
        FINISH
        DEF V_0010 TYPEOF  integer, function, format=1, external-spec-indirect
        START
        DEF V_0011 N  type=0, name, format=0, 0
        FINISH
        DEF V_0011 SIZEOF  integer, function, format=1, external-spec-indirect
        START
        DEF V_0012 N  type=0, name, format=0, 0
        FINISH
        DEF V_0012 TYPENAME  string, function, format=255, external-spec-indirect
        START
        DEF V_0013 T  integer, simple, format=1, 0
        FINISH
        DEF V_0013 ARRAYENTRYSIZE  integer, function, format=1, external-spec-indirect
        START
        DEF V_0014 N  type=0, name, format=0, 0
        FINISH
        DEF V_0014 ARRAYENTRYTYPE  integer, function, format=1, external-spec-indirect
        START
        DEF V_0015 N  type=0, name, format=0, 0
        FINISH
        DEF V_0015 ARRAYDIMENSIONS  integer, function, format=1, external-spec-indirect
        START
        DEF V_0016 N  type=0, name, format=0, 0
        FINISH
        DEF V_0016 ARRAYLOWERBOUND  integer, function, format=1, external-spec-indirect
        START
        DEF V_0017 N  type=0, name, format=0, 0
        DEF V_0018 INDEX  integer, simple, format=1, 0
        FINISH
        DEF V_0017 ARRAYUPPERBOUND  integer, function, format=1, external-spec-indirect
        START
        DEF V_0018 N  type=0, name, format=0, 0
        DEF V_0019 INDEX  integer, simple, format=1, 0
        FINISH
        DEF V_0018 EVENTFM  record, record-format, format=24, 0
        START
        DEF V_0000 EVENT  integer, simple, format=1, 0
        DEF V_0000 SUB  integer, simple, format=1, 0
        DEF V_0000 INFO  integer, simple, format=1, 0
        DEF V_0000 LINE  integer, simple, format=1, 0
        DEF V_0000 MESSAGE  string, simple, format=255, 0
        FINISH
        DEF V_0019 EVENT  record, map, format=24, external-spec
        START
        FINISH
        DEF V_001a INPUTSTREAM  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_001b INPUTNAME  string, function, format=255, external-spec-indirect
        START
        FINISH
        DEF V_001c SELECTINPUT  type=0, routine, format=0, external-spec
        START
        DEF V_001d N  integer, simple, format=1, 0
        FINISH
        DEF V_001d OPENINPUT  type=0, routine, format=0, external-spec
        START
        DEF V_001e N  integer, simple, format=1, 0
        DEF V_001f FD  string, simple, format=255, 0
        FINISH
        DEF V_001e OPENBINARYINPUT  type=0, routine, format=0, external-spec
        START
        DEF V_001f N  integer, simple, format=1, 0
        DEF V_0020 FD  string, simple, format=255, 0
        FINISH
        DEF V_001f CLOSEINPUT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0020 RESETINPUT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0021 SEEKINPUT  type=0, routine, format=0, external-spec
        START
        DEF V_0022 DISPLACEMENT  integer, simple, format=1, 0
        DEF V_0023 STARTPOINT  integer, simple, format=1, 0
        FINISH
        DEF V_0022 TELLINPUT  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0023 READSYMBOL  type=0, routine, format=0, external-spec
        START
        DEF V_0024 P  type=0, name, format=0, 0
        FINISH
        DEF V_0024 NEXTSYMBOL  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0025 READBUFFER  integer, function, format=1, external-spec-indirect
        START
        DEF V_0026 PTR  type=0, name, format=0, 0
        DEF V_0027 COUNT  integer, simple, format=1, 0
        FINISH
        DEF V_0026 PROMPT  type=0, routine, format=0, external-spec
        START
        DEF V_0027 S  string, simple, format=31, 0
        FINISH
        DEF V_0027 CURRENTPROMPT  string, function, format=31, external-spec-indirect
        START
        FINISH
        DEF V_0028 GETMAXINPUTSTREAM  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0029 FILEEND  type=0, predicate, format=0, external-spec
        START
        FINISH
        DEF V_002a ALLOWEOFEVENT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_002b BLOCKEOFEVENT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_002c OUTPUTSTREAM  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_002d OUTPUTNAME  string, function, format=255, external-spec-indirect
        START
        FINISH
        DEF V_002e SELECTOUTPUT  type=0, routine, format=0, external-spec
        START
        DEF V_002f N  integer, simple, format=1, 0
        FINISH
        DEF V_002f OPENOUTPUT  type=0, routine, format=0, external-spec
        START
        DEF V_0030 N  integer, simple, format=1, 0
        DEF V_0031 FD  string, simple, format=255, 0
        FINISH
        DEF V_0030 OPENBINARYOUTPUT  type=0, routine, format=0, external-spec
        START
        DEF V_0031 N  integer, simple, format=1, 0
        DEF V_0032 FD  string, simple, format=255, 0
        FINISH
        DEF V_0031 CLOSEOUTPUT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0032 RESETOUTPUT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0033 SEEKOUTPUT  type=0, routine, format=0, external-spec
        START
        DEF V_0034 DISPLACEMENT  integer, simple, format=1, 0
        DEF V_0035 STARTPOINT  integer, simple, format=1, 0
        FINISH
        DEF V_0034 TELLOUTPUT  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0035 PRINTSYMBOL  type=0, routine, format=0, external-spec
        START
        DEF V_0036 SYM  integer, simple, format=1, 0
        FINISH
        DEF V_0036 WRITEBUFFER  integer, function, format=1, external-spec-indirect
        START
        DEF V_0037 PTR  type=0, name, format=0, 0
        DEF V_0038 COUNT  integer, simple, format=1, 0
        FINISH
        DEF V_0037 DEBUGSYMBOL  type=0, routine, format=0, external-spec
        START
        DEF V_0038 SYM  integer, simple, format=1, 0
        FINISH
        DEF V_0038 DEBUGREAL  type=0, routine, format=0, external-spec
        START
        DEF V_0039 D  long-real, simple, format=4, 0
        FINISH
        DEF V_0039 GETMAXOUTPUTSTREAM  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_003a FLUSHOUTPUT  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_003b SKIPSYMBOL  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_003c PRINTSTRING  type=0, routine, format=0, external-spec
        START
        DEF V_003d S  string, simple, format=255, 0
        FINISH
        DEF V_003d DEBUGSTRING  type=0, routine, format=0, external-spec
        START
        DEF V_003e S  string, simple, format=255, 0
        FINISH
        DEF V_003e DEBUGNEWLINE  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_003f DEBUGSPACE  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0040 DEBUGSPACES  type=0, routine, format=0, external-spec
        START
        DEF V_0041 COUNT  integer, simple, format=1, 0
        FINISH
        DEF V_0041 WRITE  type=0, routine, format=0, external-spec
        START
        DEF V_0042 V  integer, simple, format=1, 0
        DEF V_0043 P  integer, simple, format=1, 0
        FINISH
        DEF V_0042 SPACE  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0043 SPACES  type=0, routine, format=0, external-spec
        START
        DEF V_0044 N  integer, simple, format=1, 0
        FINISH
        DEF V_0044 NEWLINE  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0045 NEWLINES  type=0, routine, format=0, external-spec
        START
        DEF V_0046 N  integer, simple, format=1, 0
        FINISH
        DEF V_0046 PRINTFL  type=0, routine, format=0, external-spec
        START
        DEF V_0047 F  long-real, simple, format=4, 0
        DEF V_0048 DP  integer, simple, format=1, 0
        FINISH
        DEF V_0047 PRINTREAL  type=0, routine, format=0, external-spec
        START
        DEF V_0048 F  long-real, simple, format=4, 0
        DEF V_0049 SF  integer, simple, format=1, 0
        DEF V_004a PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_0048 PRINTFLOAT  type=0, routine, format=0, external-spec
        START
        DEF V_0049 F  long-real, simple, format=4, 0
        DEF V_004a SF  integer, simple, format=1, 0
        FINISH
        DEF V_0049 INTPT  integer, function, format=1, external-spec-indirect
        START
        DEF V_004a R  long-real, simple, format=4, 0
        FINISH
        DEF V_004a TOUPPER  type=0, routine, format=0, external-spec
        START
        DEF V_004b S  string, name, format=0, 0
        FINISH
        DEF V_004b TOLOWER  type=0, routine, format=0, external-spec
        START
        DEF V_004c S  string, name, format=0, 0
        FINISH
        DEF V_004c ITOS  string, function, format=255, external-spec-indirect
        START
        DEF V_004d N  integer, simple, format=1, 0
        DEF V_004e PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_004d FTOS  string, function, format=255, external-spec-indirect
        START
        DEF V_004e F  long-real, simple, format=4, 0
        DEF V_004f SF  integer, simple, format=1, 0
        DEF V_0050 PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_004e FTOSP  string, function, format=255, external-spec-indirect
        START
        DEF V_004f F  long-real, simple, format=4, 0
        DEF V_0050 PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_004f READ  type=0, routine, format=0, external-spec
        START
        DEF V_0050 PTR  type=0, name, format=0, 0
        FINISH
        DEF V_0050 SUBSTRING  string, function, format=255, external-spec-indirect
        START
        DEF V_0051 S  string, simple, format=255, 0
        DEF V_0052 FROM  integer, simple, format=1, 0
        DEF V_0053 TO  integer, simple, format=1, 0
        FINISH
        DEF V_0051 TRIM  string, function, format=255, external-spec-indirect
        START
        DEF V_0052 S  string, simple, format=255, 0
        DEF V_0053 MAX  integer, simple, format=1, 0
        FINISH
        DEF V_0052 SETDEBUG  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0053 CLEARDEBUG  type=0, routine, format=0, external-spec
        START
        FINISH
        DEF V_0054 DEBUGMODE  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0055 SHOWDEBUG  type=0, predicate, format=0, external-spec
        START
        FINISH
        DEF V_0056 SETDEBUGLEVEL  type=0, routine, format=0, external-spec
        START
        DEF V_0057 LVL  integer, simple, format=1, 0
        FINISH
        DEF V_0057 INT2ASCII  string, function, format=255, external-spec-indirect
        START
        DEF V_0058 NN  integer, simple, format=1, 0
        DEF V_0059 BASE  integer, simple, format=1, 0
        DEF V_005a PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_0058 FORMATNUMBER  string, function, format=255, external-spec-indirect
        START
        DEF V_0059 N  integer, simple, format=1, 0
        DEF V_005a BASE  integer, simple, format=1, 0
        DEF V_005b PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_0059 INT2HEX  string, function, format=255, external-spec-indirect
        START
        DEF V_005a NN  integer, simple, format=1, 0
        DEF V_005b PLACES  integer, simple, format=1, 0
        FINISH
        DEF V_005a INT2BIN  string, function, format=32, external-spec-indirect
        START
        DEF V_005b NN  integer, simple, format=1, 0
        FINISH
        DEF V_005b SHORT2BIN  string, function, format=16, external-spec-indirect
        START
        DEF V_005c NN  short-integer, simple, format=3, 0
        FINISH
        DEF V_005c GETENVCOUNT  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_005d GETENVNAME  string, function, format=255, external-spec-indirect
        START
        DEF V_005e INDEX  integer, simple, format=1, 0
        FINISH
        DEF V_005e GETENV  string, function, format=255, external-spec-indirect
        START
        DEF V_005f INDEX  integer, simple, format=1, 0
        FINISH
        DEF V_005f GETENVINDEX  integer, function, format=1, external-spec-indirect
        START
        DEF V_0060 VARNAME  string, simple, format=255, 0
        FINISH
        DEF V_0060 GETENVASSTRING  string, function, format=255, external-spec-indirect
        START
        DEF V_0061 ENVNAME  string, simple, format=255, 0
        FINISH
        DEF V_0061 GETENVASINTEGER  integer, function, format=1, external-spec-indirect
        START
        DEF V_0062 VARNAME  string, simple, format=255, 0
        FINISH
        DEF V_0062 GETARGCOUNT  integer, function, format=1, external-spec-indirect
        START
        FINISH
        DEF V_0063 GETARG  string, function, format=255, external-spec-indirect
        START
        DEF V_0064 INDEX  integer, simple, format=1, 0
        FINISH
        ALIAS "_imp_cliparam"
        DEF V_0064 CLIPARAM  string, function, format=255, external-spec-indirect
        START
        FINISH
        DEF V_0065 NEW  record, map, format=0, external-spec
        START
        DEF V_0066 TEMPLATE  type=0, name, format=0, 0
        FINISH
        DEF V_0066 DISPOSE  type=0, routine, format=0, external-spec
        START
        DEF V_0067 TEMPLATE  type=0, name, format=0, 0
        FINISH
        DEF V_0067 SQRT  long-real, function, format=4, external-spec-indirect
        START
        DEF V_0068 X  long-real, simple, format=4, 0
        FINISH
        DEF V_0068 PI  long-real, function, format=4, external-spec-indirect
        START
        FINISH
        DEF V_0069 SINE  long-real, function, format=4, external-spec-indirect
        START
        DEF V_006a X  long-real, simple, format=4, 0
        FINISH
        DEF V_006a COSINE  long-real, function, format=4, external-spec-indirect
        START
        DEF V_006b X  long-real, simple, format=4, 0
        FINISH
        DEF V_006b LOG2  long-real, function, format=4, external-spec-indirect
        START
        DEF V_006c X  long-real, simple, format=4, 0
        FINISH
        DEF V_006c LOG  long-real, function, format=4, external-spec-indirect
        START
        DEF V_006d X  long-real, simple, format=4, 0
        FINISH
        DEF V_006d LOG10  long-real, function, format=4, external-spec-indirect
        START
        DEF V_006e X  long-real, simple, format=4, 0
        FINISH
        DEF V_006e EXIT  type=0, routine, format=0, external-spec
        START
        DEF V_006f STATUS  integer, simple, format=1, 0
        FINISH
        LINE 1
     1  %begin
        BEGIN
        LINE 3
     2  
     3      %string(255) %fn lameoftype( %integer t )
        GOTO L_0000
        DEF V_006f LAMEOFTYPE  string, function, format=255, 0-indirect
        START
        DEF V_0070 T  integer, simple, format=1, 0
        FINISH
        LINE 4
     4          %integer x
        DEF V_0071 X  integer, simple, format=1, 0
        LINE 5
     5          %string(255) s
        DEF V_0072 S  string, simple, format=255, 0
        LINE 6
     6          %switch sw(0:31)
        PUSHI #0x00000000
        PUSHI #0x0000001f
        BOUNDS
        DEF V_0073 SW  type=0, switch, format=0, 0
        LINE 8
     7  
     8          s = ""
        PUSH V_0072
        PUSHS ""
        ASSVAL
        LINE 9
     9          x = t&31
        PUSH V_0071
        PUSH V_0070
        PUSHI #0x0000001f
        AND
        ASSVAL
        LINE 10
    10          x = 31 %if (x#t)
        PUSH V_0071
        PUSH V_0070
        JUMPIF = L_0004
        PUSH V_0071
        PUSHI #0x0000001f
        ASSVAL
        LOCATE L_0004
        LINE 12
    11  
    12          -> sw(x)
        PUSH V_0071
        SJUMP 115
        LINE 15
    13          ! type value given in the document "THE IMP LANGUAGE - A Reference Manual"
    14          ! as output values from typeof.
    15          sw(0):  s = "unknown";            -> esac
        PUSHI #0x00000000
        SLABEL 115
        LINE 15
        PUSH V_0072
        PUSHS "unknown"
        ASSVAL
        LINE 15
        JUMP L_0074
        LINE 16
    16          sw(1):  s = "integer";            -> esac
        PUSHI #0x00000001
        SLABEL 115
        LINE 16
        PUSH V_0072
        PUSHS "integer"
        ASSVAL
        LINE 16
        JUMP L_0074
        LINE 17
    17          sw(2):  s = "real";               -> esac
        PUSHI #0x00000002
        SLABEL 115
        LINE 17
        PUSH V_0072
        PUSHS "real"
        ASSVAL
        LINE 17
        JUMP L_0074
        LINE 18
    18          sw(3):  s = "string";             -> esac
        PUSHI #0x00000003
        SLABEL 115
        LINE 18
        PUSH V_0072
        PUSHS "string"
        ASSVAL
        LINE 18
        JUMP L_0074
        LINE 19
    19          sw(4):  s = "record";             -> esac
        PUSHI #0x00000004
        SLABEL 115
        LINE 19
        PUSH V_0072
        PUSHS "record"
        ASSVAL
        LINE 19
        JUMP L_0074
        LINE 20
    20          sw(5):  s = "byte";               -> esac
        PUSHI #0x00000005
        SLABEL 115
        LINE 20
        PUSH V_0072
        PUSHS "byte"
        ASSVAL
        LINE 20
        JUMP L_0074
        LINE 21
    21          sw(6):  s = "shortinteger";       -> esac
        PUSHI #0x00000006
        SLABEL 115
        LINE 21
        PUSH V_0072
        PUSHS "shortinteger"
        ASSVAL
        LINE 21
        JUMP L_0074
        LINE 22
    22          sw(7):  s = "longinteger";        -> esac
        PUSHI #0x00000007
        SLABEL 115
        LINE 22
        PUSH V_0072
        PUSHS "longinteger"
        ASSVAL
        LINE 22
        JUMP L_0074
        LINE 23
    23          sw(8):  s = "longreal";           -> esac
        PUSHI #0x00000008
        SLABEL 115
        LINE 23
        PUSH V_0072
        PUSHS "longreal"
        ASSVAL
        LINE 23
        JUMP L_0074
        LINE 24
    24          sw(9):  s = "array";              -> esac
        PUSHI #0x00000009
        SLABEL 115
        LINE 24
        PUSH V_0072
        PUSHS "array"
        ASSVAL
        LINE 24
        JUMP L_0074
        LINE 25
    25          sw(10): s = "label";              -> esac
        PUSHI #0x0000000a
        SLABEL 115
        LINE 25
        PUSH V_0072
        PUSHS "label"
        ASSVAL
        LINE 25
        JUMP L_0074
        LINE 28
    26  
    27          ! Additional type values to further describe the type passed to typeof
    28          sw(15): s = "name";               -> esac
        PUSHI #0x0000000f
        SLABEL 115
        LINE 28
        PUSH V_0072
        PUSHS "name"
        ASSVAL
        LINE 28
        JUMP L_0074
        LINE 29
    29          sw(16): s = "integer array";      -> esac
        PUSHI #0x00000010
        SLABEL 115
        LINE 29
        PUSH V_0072
        PUSHS "integer array"
        ASSVAL
        LINE 29
        JUMP L_0074
        LINE 30
    30          sw(17): s = "real array";         -> esac
        PUSHI #0x00000011
        SLABEL 115
        LINE 30
        PUSH V_0072
        PUSHS "real array"
        ASSVAL
        LINE 30
        JUMP L_0074
        LINE 31
    31          sw(18): s = "string array";       -> esac
        PUSHI #0x00000012
        SLABEL 115
        LINE 31
        PUSH V_0072
        PUSHS "string array"
        ASSVAL
        LINE 31
        JUMP L_0074
        LINE 32
    32          sw(19): s = "record array";       -> esac
        PUSHI #0x00000013
        SLABEL 115
        LINE 32
        PUSH V_0072
        PUSHS "record array"
        ASSVAL
        LINE 32
        JUMP L_0074
        LINE 33
    33          sw(20): s = "byte array";         -> esac
        PUSHI #0x00000014
        SLABEL 115
        LINE 33
        PUSH V_0072
        PUSHS "byte array"
        ASSVAL
        LINE 33
        JUMP L_0074
        LINE 34
    34          sw(21): s = "shortinteger array"; -> esac
        PUSHI #0x00000015
        SLABEL 115
        LINE 34
        PUSH V_0072
        PUSHS "shortinteger array"
        ASSVAL
        LINE 34
        JUMP L_0074
        LINE 35
    35          sw(22): s = "longinteger array";  -> esac
        PUSHI #0x00000016
        SLABEL 115
        LINE 35
        PUSH V_0072
        PUSHS "longinteger array"
        ASSVAL
        LINE 35
        JUMP L_0074
        LINE 36
    36          sw(23): s = "longreal array";     -> esac
        PUSHI #0x00000017
        SLABEL 115
        LINE 36
        PUSH V_0072
        PUSHS "longreal array"
        ASSVAL
        LINE 36
        JUMP L_0074
        LINE 37
    37          sw(24): s = "array array";        -> esac
        PUSHI #0x00000018
        SLABEL 115
        LINE 37
        PUSH V_0072
        PUSHS "array array"
        ASSVAL
        LINE 37
        JUMP L_0074
        LINE 38
    38          sw(25): s = "label array";        -> esac
        PUSHI #0x00000019
        SLABEL 115
        LINE 38
        PUSH V_0072
        PUSHS "label array"
        ASSVAL
        LINE 38
        JUMP L_0074
        LINE 39
    39          sw(*):  s = "unknown type";       -> esac
        PUSHI #0x0000000b
        SLABEL 115
        PUSHI #0x0000000c
        SLABEL 115
        PUSHI #0x0000000d
        SLABEL 115
        PUSHI #0x0000000e
        SLABEL 115
        PUSHI #0x0000001a
        SLABEL 115
        PUSHI #0x0000001b
        SLABEL 115
        PUSHI #0x0000001c
        SLABEL 115
        PUSHI #0x0000001d
        SLABEL 115
        PUSHI #0x0000001e
        SLABEL 115
        PUSHI #0x0000001f
        SLABEL 115
        LINE 39
        PUSH V_0072
        PUSHS "unknown type"
        ASSVAL
        LINE 39
        JUMP L_0074
        LINE 40
    40      esac:
        LABEL L_0074
        LINE 41
    41          %result = s
        PUSH V_0072
        RESULT
        LINE 42
    42      %end
        END
        LOCATE L_0000
        LINE 44
    43  
    44      %routine showresults( %string(255) s, %integer t )
        GOTO L_0000
        DEF V_0070 SHOWRESULTS  type=0, routine, format=0, 0
        START
        DEF V_0071 S  string, simple, format=255, 0
        DEF V_0072 T  integer, simple, format=1, 0
        FINISH
        LINE 45
    45          %string(255) ts
        DEF V_0073 TS  string, simple, format=255, 0
        LINE 47
    46  
    47          ts = ""
        PUSH V_0073
        PUSHS ""
        ASSVAL
        LINE 48
    48          ts = nameoftype( t )
        LINE 51
    49  !!        lts = lnameoftype( t )
    50  
    51          printstring( s )
        PUSH V_003c
        PUSH V_0071
        ASSPAR
        CALL
        LINE 52
    52          printstring( " (=" )
        PUSH V_003c
        PUSHS " (="
        ASSPAR
        CALL
        LINE 53
    53          write( t, 2 )
        PUSH V_0041
        PUSH V_0072
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 54
    54          printstring( ")= '" )
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 55
    55          printstring( nameoftype( t ) )
        LINE 56
    56          printstring( "'" )
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 59
    57  
    58  !        selectoutput(0)
    59          spaces( 1 + length("longreal array") - length( ts ) )
        PUSH V_0043
        PUSHI #0x00000001
        PUSH V_000c
        PUSHS "longreal array"
        ASSPAR
        CALL
        ADD
        PUSH V_000c
        PUSH V_0073
        ASSPAR
        CALL
        SUB
        ASSPAR
        CALL
        LINE 61
    60  
    61          printstring( s )
        PUSH V_003c
        PUSH V_0071
        ASSPAR
        CALL
        LINE 62
    62          printstring( " (=" )
        PUSH V_003c
        PUSHS " (="
        ASSPAR
        CALL
        LINE 63
    63          write( t, 2 )
        PUSH V_0041
        PUSH V_0072
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 64
    64          printstring( ")" )
        PUSH V_003c
        PUSHS ")"
        ASSPAR
        CALL
        LINE 65
    65          printstring( "= '" )
        PUSH V_003c
        PUSHS "= '"
        ASSPAR
        CALL
        LINE 66
    66          printstring( ts )
        PUSH V_003c
        PUSH V_0073
        ASSPAR
        CALL
        LINE 67
    67          printstring( "'" )
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 69
    68  
    69          newline
        PUSH V_0044
        CALL
        LINE 70
    70      %end
        END
        LOCATE L_0000
        LINE 72
    71  
    72    %integer to
        DEF V_0071 TO  integer, simple, format=1, 0
        LINE 73
    73    %integer v1 = 123
        DEF V_0072 V1  integer, simple, format=1, 0
        PUSH V_0072
        PUSHI #0x0000007b
        ASSVAL
        LINE 74
    74    %string(4) v2 = "ABCD"
        DEF V_0073 V2  string, simple, format=4, 0
        PUSH V_0073
        PUSHS "ABCD"
        ASSVAL
        LINE 75
    75    %byteinteger v3 = 123
        DEF V_0074 V3  byte-integer, simple, format=2, 0
        PUSH V_0074
        PUSHI #0x0000007b
        ASSVAL
        LINE 76
    76    %longreal v4 = 1.2345
        DEF V_0075 V4  long-real, simple, format=4, 0
        PUSH V_0075
        PUSHR code=0 len=6 "1.2345"
        ASSVAL
        LINE 77
    77    %real v5
        DEF V_0076 V5  real, simple, format=1, 0
        LINE 79
    78  
    79    %recordformat x(%shortinteger f1, %real f2, %longreal f3, %bytearray f4(0:5) )
        DEF V_0077 X  record, record-format, format=119, 0
        START
        DEF V_0000 F1  short-integer, simple, format=3, 0
        DEF V_0000 F2  real, simple, format=1, 0
        DEF V_0000 F3  long-real, simple, format=4, 0
        DEF V_0000 F4  byte-integer, array, format=2, 0
        PUSHI #0x00000000
        PUSHI #0x00000005
        DIM 0001 0001
        FINISH
        LINE 80
    80    %record(x) v6
        DEF V_0078 V6  record, simple, format=119, 0
        LINE 82
    81  
    82    v6_f1=234
        PUSH V_0078
        SELECT V_0001
        PUSHI #0x000000ea
        ASSVAL
        LINE 83
    83    v6_f2=2.3456
        PUSH V_0078
        SELECT V_0002
        PUSHR code=0 len=6 "2.3456"
        ASSVAL
        LINE 84
    84    v6_f3=3.4567890123456789
        PUSH V_0078
        SELECT V_0003
        PUSHR code=0 len=18 "3.4567890123456789"
        ASSVAL
        LINE 85
    85    v6_f4(0)=255
        PUSH V_0078
        SELECT V_0004
        PUSHI #0x00000000
        ACCESS
        PUSHI #0x000000ff
        ASSVAL
        LINE 86
    86    %longreal %array v7(0:3,1:4); v7(1,3) = 1.2345
        DEF V_0079 V7  long-real, array, format=4, 0
        PUSHI #0x00000000
        PUSHI #0x00000003
        PUSHI #0x00000001
        PUSHI #0x00000004
        DIM 0002 0001
        LINE 86
        PUSH V_0079
        PUSHI #0x00000001
        INDEX
        PUSHI #0x00000003
        ACCESS
        PUSHR code=0 len=6 "1.2345"
        ASSVAL
        LINE 87
    87    %byteinteger %array v8(0:3,1:4,2:7); v8(0,1,7) = 1
        DEF V_007a V8  byte-integer, array, format=2, 0
        PUSHI #0x00000000
        PUSHI #0x00000003
        PUSHI #0x00000001
        PUSHI #0x00000004
        PUSHI #0x00000002
        PUSHI #0x00000007
        DIM 0003 0001
        LINE 87
        PUSH V_007a
        PUSHI #0x00000000
        INDEX
        PUSHI #0x00000001
        INDEX
        PUSHI #0x00000007
        ACCESS
        PUSHI #0x00000001
        ASSVAL
        LINE 88
    88    %record(x)%array v9(0:4); v9(0)_f1=5
        DEF V_007b V9  record, array, format=119, 0
        PUSHI #0x00000000
        PUSHI #0x00000004
        DIM 0001 0001
        LINE 88
        PUSH V_007b
        PUSHI #0x00000000
        ACCESS
        SELECT V_0001
        PUSHI #0x00000005
        ASSVAL
        LINE 89
    89    %shortinteger %name v10
        DEF V_007c V10  short-integer, name, format=3, 0
        LINE 91
    90  
    91    to = typeof(v1);printstring( "typeof(v1)              [integer] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0072
        ASSPAR
        CALL
        ASSVAL
        LINE 91
        PUSH V_003c
        PUSHS "typeof(v1)              [integer] (="
        ASSPAR
        CALL
        LINE 91
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 91
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 91
        LINE 91
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 91
        PUSH V_0044
        CALL
        LINE 92
    92    to = typeof(v5);printstring( "typeof(v5)                 [real] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0076
        ASSPAR
        CALL
        ASSVAL
        LINE 92
        PUSH V_003c
        PUSHS "typeof(v5)                 [real] (="
        ASSPAR
        CALL
        LINE 92
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 92
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 92
        LINE 92
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 92
        PUSH V_0044
        CALL
        LINE 93
    93    to = typeof(v2);printstring( "typeof(v2)               [string] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0073
        ASSPAR
        CALL
        ASSVAL
        LINE 93
        PUSH V_003c
        PUSHS "typeof(v2)               [string] (="
        ASSPAR
        CALL
        LINE 93
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 93
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 93
        LINE 93
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 93
        PUSH V_0044
        CALL
        LINE 94
    94    to = typeof(v6);printstring( "typeof(v6)               [record] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0078
        ASSPAR
        CALL
        ASSVAL
        LINE 94
        PUSH V_003c
        PUSHS "typeof(v6)               [record] (="
        ASSPAR
        CALL
        LINE 94
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 94
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 94
        LINE 94
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 94
        PUSH V_0044
        CALL
        LINE 95
    95    to = typeof(v3);printstring( "typeof(v3)                 [byte] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0074
        ASSPAR
        CALL
        ASSVAL
        LINE 95
        PUSH V_003c
        PUSHS "typeof(v3)                 [byte] (="
        ASSPAR
        CALL
        LINE 95
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 95
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 95
        LINE 95
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 95
        PUSH V_0044
        CALL
        LINE 96
    96    to = typeof(v4);printstring( "typeof(v4)             [longreal] (="); write(to,2); printstring(")= '"); printstring( nameoftype(to) ); printstring("'"); newline
        PUSH V_0071
        PUSH V_0010
        PUSH V_0075
        ASSPAR
        CALL
        ASSVAL
        LINE 96
        PUSH V_003c
        PUSHS "typeof(v4)             [longreal] (="
        ASSPAR
        CALL
        LINE 96
        PUSH V_0041
        PUSH V_0071
        ASSPAR
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 96
        PUSH V_003c
        PUSHS ")= '"
        ASSPAR
        CALL
        LINE 96
        LINE 96
        PUSH V_003c
        PUSHS "'"
        ASSPAR
        CALL
        LINE 96
        PUSH V_0044
        CALL
        LINE 97
    97    newline
        PUSH V_0044
        CALL
        LINE 105
    98  
    99  !  showresults( "typeof(v1)              [integer]", typeof(v1) )
   100  !  showresults( "typeof(v5)                 [real]", typeof(v5) )
   101  !  showresults( "typeof(v2)               [string]", typeof(v2) )
   102  !  showresults( "typeof(v6)               [record]", typeof(v6) )
   103  !  showresults( "typeof(v3)                 [byte]", typeof(v3) )
   104  !  showresults( "typeof(v4)             [longreal]", typeof(v4) )
   105    showresults( "typeof(v6_f1)      [shortinteger]", typeof(v6_f1) )
        PUSH V_0070
        PUSHS "typeof(v6_f1)      [shortinteger]"
        ASSPAR
        PUSH V_0010
        PUSH V_0078
        SELECT V_0001
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 106
   106    showresults( "typeof(v6_f2)              [real]", typeof(v6_f2) )
        PUSH V_0070
        PUSHS "typeof(v6_f2)              [real]"
        ASSPAR
        PUSH V_0010
        PUSH V_0078
        SELECT V_0002
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 107
   107    showresults( "typeof(v6_f3)          [longreal]", typeof(v6_f3) )
        PUSH V_0070
        PUSHS "typeof(v6_f3)          [longreal]"
        ASSPAR
        PUSH V_0010
        PUSH V_0078
        SELECT V_0003
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 108
   108    showresults( "typeof(v6_f4 (0))          [byte]", typeof(v6_f4(0)) )
        PUSH V_0070
        PUSHS "typeof(v6_f4 (0))          [byte]"
        ASSPAR
        PUSH V_0010
        PUSH V_0078
        SELECT V_0004
        PUSHI #0x00000000
        ACCESS
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 109
   109    showresults( "typeof(v7  (1,3))      [longreal]", typeof(v7(1,3)) )
        PUSH V_0070
        PUSHS "typeof(v7  (1,3))      [longreal]"
        ASSPAR
        PUSH V_0010
        PUSH V_0079
        PUSHI #0x00000001
        INDEX
        PUSHI #0x00000003
        ACCESS
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 110
   110    showresults( "typeof(v8(0,1,7))          [byte]", typeof(v8(0,1,7)) )
        PUSH V_0070
        PUSHS "typeof(v8(0,1,7))          [byte]"
        ASSPAR
        PUSH V_0010
        PUSH V_007a
        PUSHI #0x00000000
        INDEX
        PUSHI #0x00000001
        INDEX
        PUSHI #0x00000007
        ACCESS
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 112
   111  
   112    showresults( "typeof(v7)        [longrealarray]", typeof(v7) )
        PUSH V_0070
        PUSHS "typeof(v7)        [longrealarray]"
        ASSPAR
        PUSH V_0010
        PUSH V_0079
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 113
   113    showresults( "typeof(v8)            [bytearray]", typeof(v8) )
        PUSH V_0070
        PUSHS "typeof(v8)            [bytearray]"
        ASSPAR
        PUSH V_0010
        PUSH V_007a
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 114
   114    showresults( "typeof(v9)          [recordarray]", typeof(v9) )
        PUSH V_0070
        PUSHS "typeof(v9)          [recordarray]"
        ASSPAR
        PUSH V_0010
        PUSH V_007b
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 115
   115    showresults( "typeof(v6_f4)         [bytearray]", typeof(v6_f4) )
        PUSH V_0070
        PUSHS "typeof(v6_f4)         [bytearray]"
        ASSPAR
        PUSH V_0010
        PUSH V_0078
        SELECT V_0004
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 116
   116    showresults( "typeof(v10)                [name]", typeof(v10) )
        PUSH V_0070
        PUSHS "typeof(v10)                [name]"
        ASSPAR
        PUSH V_0010
        PUSH V_007c
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 117
   117    v10==v6_f1
        PUSH V_007c
        PUSH V_0078
        SELECT V_0001
        ASSREF
        LINE 118
   118    showresults( "typeof(v10==v6_f1)         [name]", 15); newline
        PUSH V_0070
        PUSHS "typeof(v10==v6_f1)         [name]"
        ASSPAR
        PUSHI #0x0000000f
        ASSPAR
        CALL
        LINE 118
        PUSH V_0044
        CALL
        LINE 120
   119  
   120  %endofprogram
        END
        END
