소스 검색

Don't use IMMEDIATE in icore

Since the fix of its RAM addr, we use the wrong CURRENT in every
usage of IMMEDIATE in icore. We therefore have to manually set the
flag for all 3 immediate words in that unit.
pull/102/head
Virgil Dupras 4 년 전
부모
커밋
2af959a13d
1개의 변경된 파일14개의 추가작업 그리고 5개의 파일을 삭제
  1. +14
    -5
      forth/icore.fs

+ 14
- 5
forth/icore.fs 파일 보기

@@ -53,7 +53,11 @@
' ( get word )
-^ ( apply offset )
, ( write! )
; IMMEDIATE
;
( We can't use IMMEDIATE because the one we've just compiled
in z80c target's the *target*'s RAM addr, not the host's.
manually set namelen field. )
0x82 CURRENT @ 1 - C!

: RAM+
[ RAMSTART LITN ] _c +
@@ -219,7 +223,10 @@

( : and ; have to be defined last because it can't be
executed now also, they can't have their real name
right away )
right away. We also can't use IMMEDIATE because the offset
used for CURRENT is the *target*'s RAM offset. we're still
on the host.
)

: X
_c (entry)
@@ -235,15 +242,17 @@
( maybe number )
ELSE _c (parse*) _c @ EXECUTE _c LITN THEN
AGAIN
; IMMEDIATE
;

: Y
['] EXIT _c ,
_c R> _c DROP ( exit : )
; IMMEDIATE
;

( Give ":" and ";" their real name )
( Give ":" and ";" their real name and make them IMMEDIATE )
0x81 ' X 1 - C!
':' ' X 4 - C!
0x81 ' Y 1 - C!
';' ' Y 4 - C!

( Add dummy entry. we use CREATE because (entry) is, at this


불러오는 중...
취소
저장