summaryrefslogtreecommitdiff
path: root/app/flint/0.4/src/isub.replace
blob: 3c4800971f1ed5cd819f6f9f9bb7cf367973507a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
PACKET isub replace DEFINES ISUB, replace : 
 
INT OP ISUB (TEXT CONST t, INT CONST i) : 
 
  INT CONST ii := i + i; 
  code (t SUB ii - 1) + 256 * code (t SUB ii) 
 
END OP ISUB; 
 
PROC replace (TEXT VAR t, INT CONST i, wert) : 
 
  INT CONST ii := i + i; 
  replace (t, ii - 1, code (wert MOD 256)); 
  replace (t, ii,  code (wert DIV 256 MOD 256)) 
 
END PROC replace 
 
END PACKET isub replace;