Выполнение действий
PROGRAM $M3
[Выполнение действий (knowhow)]
FIX 1000 BYTE VCTR BUFTXT [Буфер для текста действий]
FIX LONG VAR ABUF
: BEGABUF 0 ' BUFTXT ! ABUF ;
: RUNCMD [OID_KH] BEGABUF "KH$" S2BUF N2BUF ABUF BEGABUF ABUF E2 C2 -
TEXEC ;
: MAKECMD [OID_KH] BEGABUF ": KH$" S2BUF C N2BUF # ABUF !TB !1+ ABUF
COPY2BUF_STR " ; " S2BUF
ABUF BEGABUF ABUF E2 C2 - TEXEC ;
: S2BUF [A L] DO S2BUF1 D ;
: S2BUF1 C @B ABUF !TB !1+ ABUF 1+ ;
: N2BUF [N] 8 DO CTN-SB D 8 [C1 .. Cn n] DO CTB ;
: CTN-SB [N] C 0F & #0 + E2 -4 SHT [C N'] ;
: CTB ABUF !TB !1+ ABUF ;
LONG VAR OIDK
: NEW_VOC "PROGRAM $KH_VOC" TEXEC ;
: RUN_KH [OID_KH] NEW_VOC C MAKECMD RUNCMD ;