
             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 69
     2  
     3  ! Trying to debug why the C pass2 generates the wrong constants for %real values...
     4  ! I tried to pick a real whose representation was something easily spotted in the
     5  ! compiled file...
     6  
     7  ! This is where the constant came from:
     8  
     9  !gtoal@linux:~/src/imp77/hacks/test4$ cat src/ctest.c
    10  !#include <stdio.h>
    11  !int main(int argc, char **argv) {
    12  !  float b4;
    13  !  long b4i = 0x4edcba98;
    14  !  long *b4p = (long *)&b4;
    15  !  fprintf(stderr, "sizeof(float) = %d\n", sizeof(b4));
    16  !  *b4p = b4i;
    17  !  fprintf(stderr, "Try %8lx\n", *b4p);
    18  !  fprintf(stderr, "Try %f\n", b4);
    19  !  return(0);
    20  !}
    21  
    22  ! This is what the code above outputs:
    23  
    24  !gtoal@linux:~/src/imp77/hacks/test4$ ./ctest
    25  !sizeof(float) = 4
    26  !Try 4edcba98
    27  !Try 1851608064.000000
    28  
    29  
    30  ! And the Imp code below outputs:
    31  
    32  !gtoal@linux:~/src/imp77/hacks/test4$ ./realtest
    33  !real: 1851608064.00000
    34  !4EDCBA98
    35  !
    36  !real: 1851608064.00000
    37  !4EDCBA98
    38  !
    39  !real: 1851608064.00000
    40  !4EDCBA98
    41  !
    42  !real: 1851608064.00000
    43  !4EDCBA98
    44  !
    45  !real: 1851608064.00000
    46  !4EDCBA98
    47  !
    48  !sizeof(real) = 4
    49  
    50  ! except when compiled by pass2.c in which case the first line is real: 0.00000000000000 and 00000000
    51  
    52  ! The only difference between the output from pass2.c and pass2.imp is:
    53  
    54  !gtoal@linux:~/src/imp77/hacks/test4$ diff realtest-c2.lis realtest-i2.lis
    55  !371,374c371,374
    56  !<  0000 00 01                           db 00,01 ; ..
    57  !<  0002 00 01                           db 00,01 ; ..
    58  !<  0004 10 50                           db 10,50 ; .P
    59  !<  0006 48 00                           db 48,00 ; H.
    60  !---
    61  !>  0000 00 00                           db 00,00 ; ..
    62  !>  0002 00 00                           db 00,00 ; ..
    63  !>  0004 53 97                           db 53,97 ; S.
    64  !>  0006 DB 41                           db DB,41 ; .A
    65  
    66  ! Note that the compiler seems to store the %real constant as a %longreal and convert
    67  ! on assignment.
    68  
    69    %realfn Get Real(%integer X)
        GOTO L_0000
        DEF V_006f GETREAL  real, function, format=1, 0-indirect
        START
        DEF V_0070 X  integer, simple, format=1, 0
        FINISH
        LINE 70
    70      %result = real(addr(X))
        PUSH V_000a
        PUSH V_0005
        PUSH V_0070
        ASSPAR
        CALL
        ASSPAR
        CALL
        RESULT
        LINE 71
    71    %end
        END
        LOCATE L_0000
        LINE 74
    72  
    73    ! This is just to confirm the byte ordering...
    74    %routine Set Real by bytes(%integer X, %realname R)  ;! low to high byte
        GOTO L_0000
        DEF V_0070 SETREALBYBYTES  type=0, routine, format=0, 0
        START
        DEF V_0071 X  integer, simple, format=1, 0
        DEF V_0072 R  real, name, format=1, 0
        FINISH
        LINE 75
    75      byteinteger(addr(R)+0) =  X     &255;
        PUSH V_0007
        PUSH V_0005
        PUSH V_0072
        ASSPAR
        CALL
        PUSHI #0x00000000
        ADD
        ASSPAR
        CALL
        PUSH V_0071
        PUSHI #0x000000ff
        AND
        ASSVAL
        LINE 76
    76      byteinteger(addr(R)+1) = (X>>8) &255;
        PUSH V_0007
        PUSH V_0005
        PUSH V_0072
        ASSPAR
        CALL
        PUSHI #0x00000001
        ADD
        ASSPAR
        CALL
        PUSH V_0071
        PUSHI #0x00000008
        RSH
        PUSHI #0x000000ff
        AND
        ASSVAL
        LINE 77
    77      byteinteger(addr(R)+2) = (X>>16)&255;
        PUSH V_0007
        PUSH V_0005
        PUSH V_0072
        ASSPAR
        CALL
        PUSHI #0x00000002
        ADD
        ASSPAR
        CALL
        PUSH V_0071
        PUSHI #0x00000010
        RSH
        PUSHI #0x000000ff
        AND
        ASSVAL
        LINE 78
    78      byteinteger(addr(R)+3) = (X>>24)&255;
        PUSH V_0007
        PUSH V_0005
        PUSH V_0072
        ASSPAR
        CALL
        PUSHI #0x00000003
        ADD
        ASSPAR
        CALL
        PUSH V_0071
        PUSHI #0x00000018
        RSH
        PUSHI #0x000000ff
        AND
        ASSVAL
        LINE 79
    79    %end
        END
        LOCATE L_0000
        LINE 81
    80  
    81    %routine Set Real by integer(%integer X, %realname R)  ;! all at once
        GOTO L_0000
        DEF V_0071 SETREALBYINTEGER  type=0, routine, format=0, 0
        START
        DEF V_0072 X  integer, simple, format=1, 0
        DEF V_0073 R  real, name, format=1, 0
        FINISH
        LINE 82
    82      integer(addr(R)) = X;
        PUSH V_0006
        PUSH V_0005
        PUSH V_0073
        ASSPAR
        CALL
        ASSPAR
        CALL
        PUSH V_0072
        ASSVAL
        LINE 83
    83    %end
        END
        LOCATE L_0000
        LINE 85
    84  
    85    %routine wrn(%integer x)
        GOTO L_0000
        DEF V_0072 WRN  type=0, routine, format=0, 0
        START
        DEF V_0073 X  integer, simple, format=1, 0
        FINISH
        LINE 86
    86      %if x >= 10 %then printsymbol(x-10+'A') %else printsymbol(x+'0')
        PUSH V_0073
        PUSHI #0x0000000a
        JUMPIF < L_0004
        PUSH V_0035
        PUSH V_0073
        PUSHI #0x0000000a
        SUB
        PUSHI #0x00000041
        ADD
        ASSPAR
        CALL
        GOTO L_0003
        LOCATE L_0004
        PUSH V_0035
        PUSH V_0073
        PUSHI #0x00000030
        ADD
        ASSPAR
        CALL
        LOCATE L_0003
        LINE 87
    87    %end
        END
        LOCATE L_0000
        LINE 89
    88    
    89    %routine wrb(%integer x)  ;! high to low nibble
        GOTO L_0000
        DEF V_0073 WRB  type=0, routine, format=0, 0
        START
        DEF V_0074 X  integer, simple, format=1, 0
        FINISH
        LINE 90
    90      wrn((x>>4)&15); wrn(x&15); 
        PUSH V_0072
        PUSH V_0074
        PUSHI #0x00000004
        RSH
        PUSHI #0x0000000f
        AND
        ASSPAR
        CALL
        LINE 90
        PUSH V_0072
        PUSH V_0074
        PUSHI #0x0000000f
        AND
        ASSPAR
        CALL
        LINE 91
    91    %end
        END
        LOCATE L_0000
        LINE 93
    92    
    93    %routine wrhex(%integer x) ;! hi to low bytes
        GOTO L_0000
        DEF V_0074 WRHEX  type=0, routine, format=0, 0
        START
        DEF V_0075 X  integer, simple, format=1, 0
        FINISH
        LINE 94
    94      wrb(byteinteger(addr(x)+3));
        PUSH V_0073
        PUSH V_0007
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        PUSHI #0x00000003
        ADD
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 95
    95      wrb(byteinteger(addr(x)+2));
        PUSH V_0073
        PUSH V_0007
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        PUSHI #0x00000002
        ADD
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 96
    96      wrb(byteinteger(addr(x)+1));
        PUSH V_0073
        PUSH V_0007
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        PUSHI #0x00000001
        ADD
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 97
    97      wrb(byteinteger(addr(x)+0));
        PUSH V_0073
        PUSH V_0007
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        PUSHI #0x00000000
        ADD
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 98
    98    %end
        END
        LOCATE L_0000
        LINE 100
    99      
   100    %real Real = 1851608064.0
        DEF V_0075 REAL  real, simple, format=1, 0
        PUSH V_0075
        PUSHR code=0 len=12 "1851608064.0"
        ASSVAL
        LINE 102
   101  
   102    printstring("real: "); print(Real, 16); newline
        PUSH V_003c
        PUSHS "real: "
        ASSPAR
        CALL
        LINE 102
        LINE 102
        PUSH V_0044
        CALL
        LINE 103
   103    wrhex(integer(addr(Real))); newlines(2)
        PUSH V_0074
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 103
        PUSH V_0045
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 105
   104  
   105    integer(addr(Real)) = 16_4EDCBA98   ;! stored/printed as 98BADC4E
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        PUSHI #0x4edcba98
        ASSVAL
        LINE 108
   106                                        ;!                   |     |
   107                                        ;!                   00:   03:
   108    printstring("real: "); print(Real, 16); newline
        PUSH V_003c
        PUSHS "real: "
        ASSPAR
        CALL
        LINE 108
        LINE 108
        PUSH V_0044
        CALL
        LINE 109
   109    wrhex(integer(addr(Real))); newlines(2)
        PUSH V_0074
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 109
        PUSH V_0045
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 111
   110  
   111    Set Real by bytes(16_4EDCBA98, Real);
        PUSH V_0070
        PUSHI #0x4edcba98
        ASSPAR
        PUSH V_0075
        ASSPAR
        CALL
        LINE 112
   112    printstring("real: "); print(Real, 16); newline
        PUSH V_003c
        PUSHS "real: "
        ASSPAR
        CALL
        LINE 112
        LINE 112
        PUSH V_0044
        CALL
        LINE 113
   113    wrhex(integer(addr(Real))); newlines(2)
        PUSH V_0074
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 113
        PUSH V_0045
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 115
   114  
   115    Set Real by integer(16_4EDCBA98, Real);
        PUSH V_0071
        PUSHI #0x4edcba98
        ASSPAR
        PUSH V_0075
        ASSPAR
        CALL
        LINE 116
   116    printstring("real: "); print(Real, 16); newline
        PUSH V_003c
        PUSHS "real: "
        ASSPAR
        CALL
        LINE 116
        LINE 116
        PUSH V_0044
        CALL
        LINE 117
   117    wrhex(integer(addr(Real))); newlines(2)
        PUSH V_0074
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 117
        PUSH V_0045
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 119
   118  
   119    Real = Get Real(16_4EDCBA98);
        PUSH V_0075
        PUSH V_006f
        PUSHI #0x4edcba98
        ASSPAR
        CALL
        ASSVAL
        LINE 120
   120    printstring("real: "); print(Real, 16); newline
        PUSH V_003c
        PUSHS "real: "
        ASSPAR
        CALL
        LINE 120
        LINE 120
        PUSH V_0044
        CALL
        LINE 121
   121    wrhex(integer(addr(Real))); newlines(2)
        PUSH V_0074
        PUSH V_0006
        PUSH V_0005
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        CALL
        ASSPAR
        CALL
        LINE 121
        PUSH V_0045
        PUSHI #0x00000002
        ASSPAR
        CALL
        LINE 124
   122  
   123  
   124    printstring("sizeof(real) = "); write(sizeof(Real), 0); newline
        PUSH V_003c
        PUSHS "sizeof(real) = "
        ASSPAR
        CALL
        LINE 124
        PUSH V_0041
        PUSH V_0011
        PUSH V_0075
        ASSPAR
        CALL
        ASSPAR
        PUSHI #0x00000000
        ASSPAR
        CALL
        LINE 124
        PUSH V_0044
        CALL
        LINE 126
   125  
   126  %endofprogram
        END
        END
