; LAST UPDATE: 10.01.2024 savelij
include macros.a80
include basic_tokens.a80
ADR_LOADING EQU ADR_START ;адрес загрузки и компиляции
START_CODE EQU ADR_LOADING
ORG ADR_LOADING-0x117 ;(END_HEADER-START_SCL)
;ЗАГОЛОВОК SCL ФАЙЛА
START_SCL DB "SINCLAIR",1,"NPL B"
DW BASIC_FULL,BASIC_FULL
FULL_SIZE DB SIZE_SECTORS+1
include basic4monoloader.a80
;END_HEADER
ORG ADR_LOADING
LD HL,$
PUSH HL
LD HL,START_UNPACK
LD DE,0x5B00
LD BC,END_UNPACK-START_UNPACK
PUSH DE
LDIR
LD HL,END_COD-1
LD DE,0xFFFF
LD BC,END_COD-END_UNPACK
LDDR
LD HL,ADR_LOADING
EX DE,HL
INC HL
RET
START_UNPACK include dec40.a80
END_UNPACK binclude ../tmp/npl.pack ;имя пакованной проги
END_COD
DUPL LOW (ADR_LOADING)+0x100-LOW ($),0
IF (END_COD-ADR_LOADING)&0xFF
SIZE_SECTORS EQU ((END_COD-ADR_LOADING)>>8)+1
ELSE
SIZE_SECTORS EQU ((END_COD-ADR_LOADING)>>8)
ENDIF