figForth Word - LITERAL

  Some parts of this page/site are currently incomplete & will be updated asap
  Other parts will change continually so use “Refresh” in your browser !!
  There is extensive use of “Tooltips” text to support learning which do
not seem to render on a Smartphone


LITERAL n — (compiling) P,C2,L0

If compiling, then compile the stack value n as a 16 bit literal.
This definition is immediate so that it will execute during a colon
definition. The intended use is:

xxx [ calculate ] LITERAL ;

Compilation is suspended for the compile-time calculation of n value. Compilation is resumed and LITERAL compiles this value

NFA:    006FF7 C7            DB   0C7H
        006FF8 4C495445 5241 DB   "LITERA"
        006FFE CC            DB   'L'+80H
LFA:    006FFF D96F          DW   BCOMP-12
CFA:    007001 3C28   LITER: DW   DOCOL          ;   :
PFA:    007003 7768          DW   STATE          ;   STATE
        007005 8F27          DW   AT             ;   @
        007007 DA21 0800     DW   ZBRAN,LITE1-$  ;   IF
        00700B 0B6B          DW   COMP           ;   COMPILE
        00700D 0621          DW   LIT            ;   LIT
        00700F 2369          DW   COMMA          ;   ,
        007011        LITE1:                     ;   THEN
        007011 1725          DW   SEMIS

dfccbf

NFA:    002100 83            DB   83H
        002101 4C49          DB   "LI"
        002103 D4            DB   'T'+80H
LFA:    002104 3202          DW   QUIT-7
CFA:    002106 0821     LIT: DW   $+2
PFA:    002108 0A            LD   A,(BC)
        002109 03            INC  BC
        00210A 6F            LD   L,A
        00210B 0A            LD   A,(BC)
        00210C 03            INC  BC
        00210D 67            LD   H,A
        00210E C3 E1 20      JP   HPUSH

The Meaning of the Dictionary Fields:

NFALFACFAPFA


Updated: 31st August 2022 by David Husband
© 2021 David Husband, a.k.a. Baremetal Engineer Extraordinaire
All Rights Reserved – All Trademarks & Copyrights Acknowledged
All personal information is subject to the Data Protection Act 2018 & the UK GDPR
“ad auxilium aliis ad auxilium sibi”