home *** CD-ROM | disk | FTP | other *** search
- ; lhsfx.i
- ;──────────────────────────────────────────────────────────────────────────────
- ; LHARChive self extraction module for C64/C128 - Copyright 1990 - Chris Smeets
- ;──────────────────────────────────────────────────────────────────────────────
-
- status EQU $0090
-
- ;─────────────────────────────────────────────────────────────────
- ; Miscellaneous constants
- ;─────────────────────────────────────────────────────────────────
-
- N EQU 4096 ; String table Size
- NIL EQU N ; Value of a null code
- F EQU 60 ; Lookahead length
- THRESHOLD EQU 2 ; ??
- N_CHAR EQU 256-THRESHOLD+F ; Character code <= this value (314)
- T EQU N_CHAR*2-1 ; Size of tree tables (627)
- R EQU T-1 ; Root node position (626)
- MAX_FREQ EQU $8000 ; Cumulative frequency limit before reconst
- Tstar2 EQU 2*T
- Rstar2 EQU 2*R
-
- ; Error return codes for decode
-
- DecodeOK EQU 0
- NullFile EQU 1
- DiskError EQU 2
- CRCError EQU 3
- BadHeader EQU 4
-
-
- Z_low EQU 2 ; Lowest byte of zero page used by SFX
-
- ;─────────────────────────────────────────────────────────────────
- ; 'Registers' R0 through R3 are general purpose scratch registers.
- ;─────────────────────────────────────────────────────────────────
- ; Total 16 bytes
-
- R0 EQU Z_low
- R1 EQU R0+4
- R2 EQU R1+4
- R3 EQU R2+4
-
- ;────────────────────────────────────────────────────────────────
- ; Registers T0 through T4 are also scratch registers.
- ;────────────────────────────────────────────────────────────────
- ; Total 22 bytes
-
- T0 EQU R3+4
- T1 EQU T0+2
- T2 EQU T1+2
- T3 EQU T2+2
- T4 EQU T3+2
- T5 EQU T4+2
- T6 EQU T5+2
- T7 EQU T6+2
- T8 EQU T7+2
- T9 EQU T8+2
- T10 EQU T9+2
-
- Z_high EQU T10+2
-
- ;────────────────────────────────────────────────────────────────
- ; Other zero page used. These are not saved and restored.
- ;────────────────────────────────────────────────────────────────
-
- IBUF EQU $fa ; Pointer into memory for getc
- BITBUF EQU $fc ; Bit buffer. One byte
-