-

       


PROGRAM $SYSOBJS

B16

LONG VAR ADRSTR LONG VAR LENSTR

0 VALUE N_OID 4 VALUE N_BHR 8 VALUE N_KH

0C VALUE N_TRC 10 VALUE N_VAL 14 VALUE N_HIS

13 VALUE JRECLEN

: G_OID N_OID GOTO ; : W_OID G_OID OLS ;

: G_BHR N_BHR GOTO ; : W_BHR G_BHR OLS ;

: G_KH N_KH GOTO ; : W_KH G_KH OLS ;

: G_TRC N_TRC GOTO ; : W_TRC G_TRC OLS ;

: G_VAL N_VAL GOTO ; : W_VAL G_VAL OLS ;

: G_HIS N_HIS GOTO ; : W_HIS G_HIS OLS ;

18 VALUE SZ_HDROBJ



: W_NULLBLK -1 OLS -1 OLS 0 OLS 0 OLS ;

[ ]

ACT VAR DATWR

LONG VAR OIDV

LONG VAR VALINT

[**** ROOT ****]

SZ_HDROBJ HSIZE+ HSIZE+ 4+ VALUE SIZE_ROOT

:: : CLONE_ROOT '' DATWRROOT ! DATWR NEWOBJ1 ;

:: : CLONE_INT ! VALINT '' DATWRINT ! DATWR NEWOBJ1 ;

:: : CLONE_SET 4 CLONE_INT ;

:: : CLONE_SEQ 4 CLONE_INT ;

:: : CLONE_AGG 0C CLONE_INT ;

:: : CLONE_STR [A L] ! LENSTR ! ADRSTR '' DATWRSTR ! DATWR

LENSTR SIZE_ROOT + 4- ! SIZE_X NEWOBJ3 ;

:: : SET_BHR [OID_BHR OID] N_BHR E2 SET_X1 ;

:: : SET_KH [OID_KH OID] N_KH E2 SET_X1 ;

: SET_X1 [ADR OID] C2C2 N_TRSC E2 NEWJREC

C LOADOBJ FINDOID C BR- DD SET_X11 ;

: SET_X11 PrioQueNUM 2 Channels !NCHAN GOTO OLS ;

:: : SET_INT [int oid] C HIPRIO PUSH ! VALINT 4 '' OLSI POP NEWDREC ;

: OLSI VALINT OLS ;

:: : GET_INT [OID] TODATA ILS ;

:: : TODATA [OID] C LOADOBJ C HIPRIO FINDOID PrioQueNUM

3 Channels !NCHAN 0 GOTO ;

:: : SET_STR [A L OID] C HIPRIO

PUSH ! LENSTR ! ADRSTR LENSTR '' OLSS POP NEWDREC ;

: OLSS ADRSTR LENSTR DO DWS1 D ;

ACT VAR BYTE_STR

:: : PRINT_STR '' PRIS ! BYTE_STR ACCESS_STR ;

:: : COPY2BUF_STR '' C2BUF ! BYTE_STR ACCESS_STR ;

:: : ACCESS_STR [OID] TODATA LENVMEM 0 GOTO DO BYTE_STR ;

: PRIS IBS TOB ;

: C2BUF IBS ABUF !TB !1+ ABUF ;

: DD_ROOT

OIDV OLS 0 OLS 0 OLS 0 OLS SZ_HDROBJ HSIZE+ OLS [val]

SZ_HDROBJ OLS [his]

W_NULLBLK [W_NULLBLK] DATWR ;


LONG VAR SIZE_X

: DATWRROOT -1 OLS -1 OLS 0 OLS 4 OLS 0 OLS ;

: DATWRINT -1 OLS -1 OLS 4 OLS 4 OLS VALINT OLS ;

: DATWRSTR -1 OLS - 1 OLS LENSTR OLS LENSTR OLS ADRSTR LENSTR DO DWS1 D ;

: DWS1 [A] C @B OBS 1+ ;

: NEWOBJ1 [] SIZE_ROOT ! SIZE_X NEWOBJ3 ;

: NEWOBJ3 '' DD_ROOT ! WRI_DATA

NEWID C ! OIDV SIZE_X C2 D.NEWOBJ [OID] ;

9 VALUE LCH

LCH LONG VCTR CLONEHDR VAR DATCH LONG VAR LENVMEM1

:: : CLONE [OID] C HIPRIO

C LOADOBJ FINDOID PrioQueNUM C PUSH 2 Channels !NCHAN 0 GOTO

CLONE1 []

'' CC_ROOT ! WRI_DATA NEWID C 0 ! CLONEHDR SZ_HDROBJ HSIZE+ C2 D.NEWOBJ

[OID] POP 3 Channels C ! DATCH !NCHAN LENVMEM C ! LENVMEM1

C2 [OID_NEW LEN OID_NEW] CLONE_DATA [OID_NEW] ;

: CLONE1

ILS 1 ! CLONEHDR [BHR] ILS 2 ! CLONEHDR [KH]

ILS 3 ! CLONEHDR [TRC] 0 4 ! CLONEHDR

SZ_HDROBJ 5 ! CLONEHDR -1 6 ! CLONEHDR

-1 7 ! CLONEHDR 0 8 ! CLONEHDR

0 9 ! CLONEHDR ;

: CCR1 [N] C CLONEHDR OLS 1+ ;

: CC_ROOT 0 LCH 1+ DO CCR1 D ;

: CLONE_DATA [LEN OID] '' COPY_DATA E2 NEWDREC [] ;

: COPY_DATA [] DATCH NCHAN LENVMEM1 DO_IOBSCC DD ;

:: 0 VALUE N_TRSC

[ , ]

: NEWDREC [SIZED PROC OID] N_VAL N_TRSC C3 NEWJREC FINDOID

PrioQueNUM [SIZE PROC N] C PUSH

2 Channels !NCHAN

[SIZED PROC] ! WRI_DATA NEWVM1 G_VAL C OLS [ADR_DATA]

[ ]

GOTO POP 3 Channels LCTX [] ;

[ . : . ]

: NEWJREC [addr_hdr TRANS OID] C LOADOBJ FINDOID PrioQueNUM

[. TRANS N] C PUSH 4 Channels

!NCHAN JRECLEN UPSIZE OLS POP NCHAN PUSH 2 Channels !NCHAN

C GOTO ILS POP !NCHAN

E2 OWS OLS W_DATIME [] ;

B10

[ ]

: W_DATIME 1979 OWS 12 OBS 31 OBS TMGET TMS ;

: TMS [num] N2T GBR E2 GBR E2 GBR E2 OBS OBS OBS 100 * OWS ;

B16

[ ]

[ ]

: OBJ.J [OID]

C LOADOBJ FINDOID PrioQueNUM 4 Channels !NCHAN ;

: JVIEW [oid] CR ."Updated data:"

OBJ.J LENVMEM JRECLEN / D 0 GOTO DO JVIEW1 ;

: JVIEW1 CR ."Trans= " ILS .D SP

IWS BR N_BHR ."Behav.=" N_VAL ."AddrVal=" N_KH ."Knowhow="

ELSE ."?????? =" ILS SP .D SP JDATAV1 ;

: JDATAV1 S( BASE@ ) B10 IWS IBS IBS 2 TON #. TOB 2 TON #. TOB 4 TON

SP SP #: POS2 #: POS2 #. POS2 # IWS 4 TON TOB ;

: POS2 [B] IBS 2 TON TOB ;

[ = + ]

: SIZEMEMOBJ [N] C PrioQueOID BR0 T0 SMEMO1 [0/size] ;

: SMEMO1 3 Channels !NCHAN LENVMEM HSIZE+ HSIZE+ SZ_HDROBJ + [size] ;










Forekc.ru
, , , , , , , , , ,