diff options
Diffstat (limited to 'app/flint/0.4/src/isub.replace')
-rw-r--r-- | app/flint/0.4/src/isub.replace | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/flint/0.4/src/isub.replace b/app/flint/0.4/src/isub.replace new file mode 100644 index 0000000..3c48009 --- /dev/null +++ b/app/flint/0.4/src/isub.replace @@ -0,0 +1,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; + |