summaryrefslogtreecommitdiff
path: root/boot/stage2.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-05-12 23:07:02 +0200
committerEugen Wissner <belka@caraus.de>2025-05-12 23:07:02 +0200
commit1b31f532dfb9987788565c90db0558db6f8bed30 (patch)
treec57ceeb963430268429dadf891ce32c4d91512e9 /boot/stage2.elna
parentd85183c7a6842a4db83635c64cf85ddf37491971 (diff)
downloadelna-1b31f532dfb9987788565c90db0558db6f8bed30.tar.gz
Unify taking an identifier address
Diffstat (limited to 'boot/stage2.elna')
-rw-r--r--boot/stage2.elna23
1 files changed, 8 insertions, 15 deletions
diff --git a/boot/stage2.elna b/boot/stage2.elna
index 59bb42a..e38874c 100644
--- a/boot/stage2.elna
+++ b/boot/stage2.elna
@@ -1081,6 +1081,7 @@ proc _compile_label(loca84: Word)
var
loca0: Word
loca4: Word
+ loca8: ^Byte
begin
loca0 := _current();
@@ -1092,7 +1093,8 @@ begin
if loca0 = 0x3b then
loca4 := loca4 - 1
end;
- _write_s(loca4, s1);
+ loca8 := _current();
+ _write_s(loca4, loca8);
_write_c(0x3a);
_write_c(0x0a);
@@ -1115,6 +1117,7 @@ var
loca12: Word
loca16: Word
loca20: Word
+ loca24: Word
begin
_advance(2);
_skip_spaces();
@@ -1133,8 +1136,9 @@ begin
_write_s(4, @loca12);
_write_c(0x20);
+ loca24 := _label_counter(1);
_write_s(4, @loca16);
- _write_i(s2);
+ _write_i(loca24);
_write_c(0x0a);
@@ -1153,12 +1157,11 @@ begin
end;
_write_s(4, @loca16);
- _write_i(s2);
+ _write_i(loca24);
loca12 := 0x0a3a0a3a;
_write_s(2, @loca12);
- s2 := s2 + 1;
_advance(4)
end
@@ -1445,16 +1448,6 @@ begin
.Lcompile_end
end
-proc _current()
-begin
- return s1
-end
-
-proc _advance(loca84: Word)
-begin
- s1 := s1 + loca84
-end
-
proc _front(loca84: ^Word)
begin
return _get(loca84) & 0xff
@@ -1464,7 +1457,7 @@ proc _main()
begin
_read_file(source_code, SOURCE_BUFFER_SIZE);
- s2 := 1
+ _label_counter(0)
end
begin