flex_nav/fn_exe_boot.a80
savelij13 7940810ffd FlexNavigator 1.16.03
- MISC функции перенесены из 2 резидента в 3.
- перераспределение TAB таблиц.
- в описание Flex Navigator API добавлено описание глобальных
  переменных.
FileViewer.flx 1.07
- мелкое исправление позиции вывода даты/времени.
FileEditor.flx 1.11
- мелкое исправление позиции вывода даты/времени.
2025-08-14 09:36:20 +03:00

186 lines
4.7 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

; LAST UPDATE: 03.08.2025 savelij
include macros.a80
include macros_sp.a80
include define_sp.a80
include bios_sp.a80
include dss_sp.a80
include errors_sp.a80
include ports_sp.a80
include mouse_sp.a80
include accel_sp.a80
include fat_dir_sp.a80
include fn_version.a80
PAGES_MEM := 4
INIT_VAR 0xC000
SETVAR FONT_RAW, 6888;IFFFONT_RAW_PACK - FONT_RAW_PACK
SETVAR_ALIGN
SETVAR IFFFONT_RAW, 8704;IFFFONT_RAW_END - IFFFONT_RAW_PACK
SETVAR CLOCK_BMP, CLOCK_BMP_END - Clock_BMP
SETVAR MOUSE_BMP, MOUSE_BMP_END - Mouse_BMP
HDR_EXE 0x8100,1,EXEend-EntryExec,EntryExec,EntryExec,0x80FF,0
EntryExec: DI
LD A,(IX-0x03) ; file handle
LD (MAIN.hFile),A ; save
LD HL,MAIN.copyright_str
SPDSS DSSF.PCHARS ; print text
SPDSS DSSF.VERSION
LD A,D
OR A
JR NZ,.next1
LD HL,MAIN.incor_dos_str
SPDSS DSSF.PCHARS ; print text
SPDSS DSSF.EXIT,0x26 ; exit
.next1
SPDSS DSSF.GETMEM,PAGES_MEM ; § ¯à®á áâà ­¨æ ¯ ¬ïâ¨
JR NC,.next2 ; CY - not enough memory
LD HL,MAIN.no_memory_str
SPDSS DSSF.PCHARS ; print text
SPDSS DSSF.EXIT,0x1E ; exit
.next2 LD (MAIN.hMem),A ; memory handle
LD HL,MAIN.FNMAIN
SPBIOS BIOSF.GETMEMBLKPAGES ; get memory pages list
; § £à㧪  ª¥à­ «ï
LD A,(MAIN.FNMAIN) ; set pages from 0xC000
SETPORT WINSP.CPU3,,0
LD HL,BASE_ADDR ; FNMAIN
LD DE,END_BLOCK_1 - START_BLOCK_1
LD A,(MAIN.hFile)
SPDSS DSSF.READ
JP C,disk_error
; § £à㧪  ¤®¯®«­¨â¥«ì­ëå ä㭪権
LD A,(MAIN.FNREZ2)
SETPORT WINSP.CPU3,,0
LD HL,0xC000 ; FNREZ2
LD DE,END_BLOCK_2 - START_BLOCK_2
LD A,(MAIN.hFile)
SPDSS DSSF.READ
JP C,disk_error
; § £à㧪  ä®­â 
LD A,(MAIN.FNFONT) ; FNFONT
SETPORT WINSP.CPU3,,0
LD HL,0xFFFF - (IFFFONT_RAW_END - FONT_RAW_PACK)
LD DE,END_BLOCK_4 - START_BLOCK_4
LD A,(MAIN.hFile)
SPDSS DSSF.READ
JP C,disk_error
; à á¯ ª®¢ª  èà¨ä⮢
LD HL,0xFFFF - (IFFFONT_RAW_END - FONT_RAW_PACK)
LD DE,0xC000
CALL UNPACK
LD HL,0xFFFF - (IFFFONT_RAW_END - IFFFONT_RAW_PACK)
LD DE,0xDB00
CALL UNPACK
; ¯¥à¥­®á ¨ª®­®ª ¬ëè¨ ­  à ¡®ç¥¥ ¬¥áâ®
LD HL,Clock_BMP
LD DE,CLOCK_BMP
LD BC,CLOCK_BMP_Size + MOUSE_BMP_Size
LDIR
; § £à㧪  奫¯ 
LD A,(MAIN.FNREZ3) ; FNREZ3
SETPORT WINSP.CPU3,,0
LD HL,0xC000
LD DE,END_BLOCK_3 - START_BLOCK_3
LD A,(MAIN.hFile)
SPDSS DSSF.READ
JP C,disk_error
LD A,(MAIN.hFile)
SPDSS DSSF.CLOSE ; close file
;!TEST ; !HARDCODE SYS_PAGE
SETPORT WINSP.CPU3,PAGE.SYSTEM
LD HL,0x0124 + CPU3 ; !HARDCODE
LD (HL),0x38 ; interrupt routine address Low byte
INC HL
XOR A
LD (HL),A ; interrupt routine address High byte
INC HL
GETPORT WINSP.CPU0
LD (HL),A ; interrupt routine page
LD A,(MAIN.FNMAIN)
SETPORT WINSP.CPU3,,0
LD A,(MAIN.hMem)
LD (RAMPAGES.FNPAGESID),A
LD HL,MAIN.FNREZ2
LD DE,RAMPAGES.FNREZ2
LD BC,PAGES_MEM
LDIR
JP BASE_ADDR
disk_error: PUSH AF
LD A,(MAIN.hMem) ; free memory
SPDSS DSSF.FREEMEM
LD A,(MAIN.hFile)
SPDSS DSSF.CLOSE ; close file
LD HL,MAIN.load_err_str
SPDSS DSSF.PCHARS ; print text
POP BC
SPDSS DSSF.EXIT ; exit
UNPACK include dec40.a80
oo EQU COLORP.BLACK + COLORI.BLACK
WW EQU COLORP.WHITE + COLORI.WHITE
HH EQU COLORP.WHITE + COLORI.WHITE0E
BB EQU COLORP.WHITE + COLORI.BLACK
; ç á¨ª¨ ¤«ï ¬ëè¨
; 9 x 14 = 126 00 01 02 03 04 05 06 07 08
Clock_BMP: DB oo,oo,oo,oo,oo,oo,oo,oo,oo ; 00
DB oo,HH,HH,HH,HH,HH,HH,HH,oo ; 01
DB oo,oo,oo,oo,oo,oo,oo,oo,oo ; 02
DB WW,oo,HH,HH,HH,HH,HH,oo,WW ; 03
DB WW,oo,HH,HH,HH,oo,HH,oo,WW ; 04
DB WW,WW,oo,HH,BB,HH,oo,WW,WW ; 05
DB WW,WW,WW,oo,HH,oo,WW,WW,WW ; 06
DB WW,WW,WW,oo,HH,oo,WW,WW,WW ; 07
DB WW,WW,oo,HH,BB,HH,oo,WW,WW ; 08
DB WW,oo,HH,HH,HH,oo,HH,oo,WW ; 09
DB WW,oo,HH,HH,HH,HH,HH,oo,WW ; 0A
DB oo,oo,oo,oo,oo,oo,oo,oo,oo ; 0B
DB oo,HH,HH,HH,HH,HH,HH,HH,oo ; 0C
DB oo,oo,oo,oo,oo,oo,oo,oo,oo ; 0D
CLOCK_BMP_END
; ªãàá®à ¤«ï ¬ëè¨
; 9 x 13 = 117 00 01 02 03 04 05 06 07 08
Mouse_BMP: DB oo,oo,WW,WW,WW,WW,WW,WW,WW ; 00
DB oo,HH,oo,WW,WW,WW,WW,WW,WW ; 01
DB oo,HH,HH,oo,WW,WW,WW,WW,WW ; 02
DB oo,HH,HH,HH,oo,WW,WW,WW,WW ; 03
DB oo,HH,HH,HH,HH,oo,WW,WW,WW ; 04
DB oo,HH,HH,HH,HH,HH,oo,WW,WW ; 05
DB oo,HH,HH,HH,HH,HH,HH,oo,WW ; 06
DB oo,HH,HH,HH,HH,oo,oo,oo,oo ; 07
DB oo,HH,HH,oo,HH,oo,WW,WW,WW ; 08
DB oo,HH,oo,oo,HH,HH,oo,WW,WW ; 09
DB oo,oo,WW,WW,oo,HH,oo,WW,WW ; 0A
DB oo,WW,WW,WW,oo,HH,HH,oo,WW ; 0B
DB WW,WW,WW,WW,WW,oo,oo,WW,WW ; 0C
MOUSE_BMP_END
MAIN
.hFile db 0x00
.hMem db 0x00
.FNMAIN db 0x00
.FNREZ2 db 0x00 ; 00
.FNFONT db 0x00 ; 01
.FNREZ3 db 0x00 ; 02
DB 0xFF
.copyright_str: DZ "\r\nThe Flex Navigator, ver.\{FLEX_VERS.NAVIGATOR}\r\n"
.incor_dos_str: DZ "Incorrect DOS version, need DOS 1.00 or high.\r\n"
.no_memory_str: DZ "Not enough memory to load program.\r\n"
.load_err_str: DZ "Disk loading error.\r\n"
EXEend:
include fnmain.a80