Subversion Repositories Kolibri OS

Rev

Rev 7696 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7696 Rev 7983
Line 1... Line 1...
1
(*
1
(*
2
    BSD 2-Clause License
2
    BSD 2-Clause License
Line 3... Line 3...
3
 
3
 
4
    Copyright (c) 2018-2019, Anton Krotov
4
    Copyright (c) 2018-2019, Anton Krotov
5
    All rights reserved.
5
    All rights reserved.
Line 10... Line 10...
10
IMPORT LISTS, CHL := CHUNKLISTS, ARITH, UTILS;
10
IMPORT LISTS, CHL := CHUNKLISTS, ARITH, UTILS;
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
 
12
 
13
CONST
13
CONST
14
 
14
 
15
    RCODE*    = 1;
15
    RCODE*  = 0;  PICCODE* = RCODE + 1;
16
    RDATA*    = 2;
-
 
17
    RBSS*     = 3;
-
 
18
    RIMP*     = 4;
-
 
19
 
-
 
20
    PICCODE*  = 5;
-
 
Line 21... Line 16...
21
    PICDATA*  = 6;
16
    RDATA*  = 2;  PICDATA* = RDATA + 1;
Line 22... Line 17...
22
    PICBSS*   = 7;
17
    RBSS*   = 4;  PICBSS*  = RBSS + 1;
Line 23... Line 18...
23
    PICIMP*   = 8;
18
    RIMP*   = 6;  PICIMP*  = RIMP + 1;
Line 209... Line 204...
209
        CHL.PushByte(program.code, UTILS.Byte(x, i))
204
        CHL.PushByte(program.code, UTILS.Byte(x, i))
210
    END
205
    END
211
END PutCode32LE;
206
END PutCode32LE;
Line -... Line 207...
-
 
207
 
-
 
208
 
-
 
209
PROCEDURE PutCode16LE* (program: PROGRAM; x: INTEGER);
-
 
210
BEGIN
-
 
211
    CHL.PushByte(program.code, UTILS.Byte(x, 0));
-
 
212
    CHL.PushByte(program.code, UTILS.Byte(x, 1))
-
 
213
END PutCode16LE;
212
 
214
 
213
 
215
 
214
PROCEDURE SetLabel* (program: PROGRAM; label, offset: INTEGER);
216
PROCEDURE SetLabel* (program: PROGRAM; label, offset: INTEGER);
215
BEGIN
217
BEGIN