Blame | Last modification | View Log | Download | RSS feed
Tue Jul 17 11:00:20 2018 Page 1
2500 A.D. 65816 Macro Assembler #26960 - Version 5.02g
-----------------------------------------------------
Input Filename : src\F9\fatsys.asm
Output Filename : obj\F9\fatsys.obj
Listing Has Been Relocated
2603 .LIST on
2604
2605 F8FFB1 .INCLUDE inc\dirp00.inc
2606 ;----------------------------------------------------------
2607 ; DIRP00.ASM
2608 ; PROGETTO: B1601
2609 ;
2610 ; Variabili in Direct Page $00
2611 ;----------------------------------------------------------
2612
2613 ; sezione COMMON -- questo permette di includere il file in piu' file
2614
2615 .LIST on
2616
2617 DIRP00: .SECTION page0, ref_only, common ;Direct-Page 00
2618
2619 000000 .ABSOLUTE ;; inizia sempre da $00
2620 000000 .ORG 0x00
2621 000000
2622 000000 0000 JiffyClk .DW ; contatore 10ms 32 bit
2623 000002 0000 .DW
2624 000004 SysTmr .DS SYSTMRCNT ; system timer 0 (10ms)
2625 000008 SysTMF .DS SYSTMRCNT ; flag timer (80 -> start)
2626 00000C 00 Bnk0Flag .DB ; <7>: flag test RAM banco 0 ok
2627 ; <6>: flag warm reset
2628 00000D 00 RTCFlag .DB
2629
2630 00000E diskstat .DS 2 ; flag device on ata bus #0 & #1
2631 ; <7>: device ready
2632 ; <6>: compact flash device (C.F.)
2633 ; <5>: device identification ok
2634 ; <4>: MBR loaded
2635 ; <3>: valid signature in MBR
2636 ; <2>: first partition found&active
2637 ; <1>:
2638 ; <0>: valid partition flag
2639
2640 ; <7>: device ready
2641 ; <6>: USB device
2642 ; <5>: compact flash device (C.F.)
2643 ; <4>: device identification ok
2644 ; <3>: MBR loaded
2645 ; <2>: first partition found&active
2646 ; <1>: always 1
2647 ; <0>: valid partition flag
2648 000010
Tue Jul 17 11:00:20 2018 Page 2
2649
2650 00000E atadev .EQU diskstat
2651
2652 000010 usbdev .DS 2 ; flag flash disk on usb bus #0
2653 ; <7>: device plugged and ready
2654 ; <6>: always 1
2655 ; <5>: device identification ok
2656 ; <4>: MBR loaded
2657 ; <3>: valid signature in MBR
2658 ; <2>: first partition found&active
2659 ; <1>:
2660 ; <0>: valid partition flag
2661
2662 000012 diskmax .DS 16 ; disk max. sector's
2663 000012 atasec .EQU diskmax
2664 00001A usbsec .EQU diskmax+8
2665
2666
2667 000022 atambr .DS 8 ; data for first partition found in mbr
2668 ; first 3 bytes for start sector of partition
2669 ; last byte for partition type
2670 00002A usbmbr .DS 8
2671
2672 000032 ataprt .DS 8 ; total sec's of first partition
2673 00003A usbprt .DS 8 ; total sec's of first partition
2674
2675
2676 000042 00 usb0ch .DB ; usb0 (ch375/ch376) flag
2677 ; <7>: module on
2678 ; <6>: ch376 flag
2679 ; <5:0>: chip version
2680
2681 000043 00 usb0st .DB ; usb0 status
2682 ; <7>: usb0 host mode ok
2683 ; <6>: flash disk attached flag
2684 ; <5>: usb device attached
2685
2686 000044 00 fdcdrv .DB ; phisycal drive status (drive #0)
2687 ; <7>: disk format established in bit 0&1
2688 ; <6>: double step seek done
2689 ; <5>: trust format bit's (set after ok r/w)
2690 ; <4>: write protect bit (if disk in drive)
2691 ; <3>: don't care
2692 ; <2>: don't care
2693 ; <1>: HD disk if set else DD disk
2694 ; <0>: CBM format if set else IBM format
2695
2696 000045 00 vdrive .DB ; virtual drive status (ram disk, drive #1)
2697 ; <7>: disk format established in bit 0&1
2698 ; <6>: change disk simulation (after format)
2699 ; <5>: don't care
2700 ; <4>: write protect bit (under sw control)
2701 ; <3>: don't care
2702 ; <2>: don't care
2703 ; <1>: HD disk if set else DD disk
2704 ; <0>: CBM format if set else IBM format
2705
Tue Jul 17 11:00:20 2018 Page 3
2706 000046 00 fdcctl .DB ; fdc controller status
2707 ; <7>: drive is attached
2708 ; <6>: drive need recalibration (restore)
2709 ; <5>: FDC controller ok
2710 ; <4>: motor on
2711 ; <3>: dma is active
2712 ; <2>: dma chip ok (post routine)
2713 ; <1>: clock rate (1=HD,0=DD)
2714 ; <0>: disk ready
2715
2716 000047 00 fdctrk .DB ; fd: current seek track
2717 000048 00 fdcerr .DB ; fd: last error code
2718 000049 00 ataerr .DB ; ata: last error code
2719 00004A 00 ataxer .DB ; ata: last extended error code
2720
2721 00004B 00 CtrlBrk .DB ; flag CTRL+BREAK (NMI)
2722
2723 00004C 0000 MemTop .DW ; top memoria RAM
2724 00004E 00 .DB ; banco top mem
2725
2726 00004F 00 DflTxtIn .DB ; device di default text input
2727 000050 00 DflTxtOut .DB ; device di default text output
2728
2729 000051 COPPtr LP ; long pointer for COP decoding
2730 000054 00 COPIdx .DB ; COP signature/index
2731
2732 000055 00 BiosEnt .DB ; flag accesso a bios setup
2733
2734 ; variabili utilizzate da ACIA
2735 000056 spwrk .DS $30
2736
2737 ; bios mem
2738 000086 0000 nsize .DW ; dimensione blocco da allocare
2739 ;bsize .DW ; dimensione vera blocco free
2740 000088 0000 splitsz .DW ; dimensione blocco splittato
2741 00008A 0000 bfree .DW ; puntatore blocco free
2742 00008C 0000 hdrptr .DW ; puntatore header heap
2743
2744 00008E 0000 pbrklv .DW ; current break level of current process
2745 000090 0000 pbrkmin .DW ; minimum breal level of current process
2746 000092 0000 pbrkmax .DW ; maximum breal level of current process
2747 000094
2748 ; bios temp. work area
2749 000094 bwrktmp .DS $28
2750
2751 0000BC 00 coptmp .DB ; temp. used while cop
2752
2753 0000BD 00 tstser .DB ; check ser/usb test board post
2754 ; <7>: VIA2 ok
2755 ; <6>: PICRAM ok
2756 ; <1>: UART 16C550 ok
2757 ; <0>: R65C51 ok
2758
2759
2760 ;crc16 .DW
2761
2762 0000BD .RELATIVE
Tue Jul 17 11:00:20 2018 Page 4
2763
2764 .ENDS
2765
2766 [01] .IFDEF _ACIA_INC_
2767 .INCLUDE INC\SP.INC
2768 [00] .ENDIF
2769
2794 .LIST on
2795
2796 ;---------------------------------------------------------------------------
2797
2798 000020 HPLMAX .EQU 32 ; Max. subdirectory level
2799
2800 000200 BCBCNT .EQU $200 ; BCB's struct's count #
2801 000C00 BCBXBNK .EQU $0C00 ; starting BCB x-mem buffer #
2802 000040 DMACNT .EQU 64
2803
2804 0000E0 FAT0X .EQU $E0 ; x-mem bank for fat table of ata #0
2805 0000F0 FAT1X .EQU $F0 ; x-mem bank for fat table of ata #1
2806
2807 F8FFB1 .INCLUDE INC\LDT.INC
2808 ; LDT.INC
2809
2810 [01] .IFNDEF __LDT_INC__
2811 000001 __LDT_INC__ .SET 1
2812
2813 .LIST on
2814 ;---------------------------------------------------------------------------
2815 ; Logical Drive Table (LDT) -- page 0 offset's
2816 ;---------------------------------------------------------------------------
2817
2818 F8FFB1 STRUCT LDT
2819 _LDT .SECTION page0,common,ref_only,offset 0 ;LDT Struct
2820 ;.ABSOLUTE
2821 ;.ORG 0
2822 .MNLIST
2823 000000 00 ldt_fg1 .DB ; logical volume flag's
2824 ; <7>: device ready (fdc drive or ata device)
2825 ; <6>: if=1->HD/CF else->FD
2826 ; <1:0>: phisycal device number
2827
2828 000001 00 ldt_fg2 .DB ; <7>: valid volume (fat volume or cbm disk)
2829 ; <6>: if=1->FAT else->CBM (FD only)
2830 ; <5>: disk format checked
2831 ; <1:0>: disk format (fdc only)
2832
2833 000002 0000 ldt_root .DW ; lba of root dir
2834 000004 0000 ldt_fat1 .DW ; lba of fat1 table
2835 000006 0000 ldt_fat2 .DW ; lba of fat2 table
2836 000008 0000 ldt_cls .DW ; lba of first data cluster
2837 00000A 0000 ldt_max .DW ; max usable cluster + 1
2838 00000C 0000 ldt_rent .DW ; root dir. max. entries
2839 00000E 0000 ldt_cent .DW ; max. entries in dir. cluster
2840 000010 0000 ldt_eoc .DW ; end of cluster chain marker
2841 000012 0000 ldt_free .DW ; count of free cluster's
2842 000014 0000 ldt_nxt .DW ; next free cluster
2843 000016 0000 ldt_fsiz .DW ; fat table size
Tue Jul 17 11:00:20 2018 Page 5
2844
2845 000018 00 ldt_csiz .DB ; cluster size (1,2,4,8,16,32,64)
2846 000019 00 ldt_cshf .DB ; cluster shift (0,1,2,3,4,5,6)
2847 00001A 00 ldt_rsiz .DB ; root dir. size (sector's)
2848 00001B 00 ldt_mcls .DB ; mask for clust. module: 00,01,03,07,0F,1F,3F
2849 00001C 0000 ldt_cdlp .DW ; current working dir list pointer
2850 00001E 0000 ldt_cdcls .DW ; current working dir start cluster
2851 000020 00 ldt_cdlvl .DB ; current working dir level count
2852
2853 000021 00 ldt_ptype .DB
2854 000022 0000 0000 ldt_pstart .LWORD
2855 000026 0000 0000 ldt_psize .LWORD
2856
2857 000022 ldt_fp .EQU ldt_pstart ; fat table buffer long pointer
2858 000025 ldt_fbuf .EQU ldt_pstart+3 ; fat table: x-mem base bank/dma buffer
2859
2860 000026 ldt_pbr .EQU ldt_psize ; long pointer to PBR cache buffer
2861 000029 ldt_fmt .EQU ldt_psize+3
2862
2863 00002A ESTRUCT LDT
2864 00002A LDTSIZE .DS 0
2865 ;.RELATIVE
2866 .ENDS
2867 .MNLIST
2868
2869 [00] .ENDIF
2870
2871 F8FFB1
2872 ;---------------------------------------------------------------------------
2873 ; Hierarchical Path List (HPL) -- 16 bit offset's
2874 ;---------------------------------------------------------------------------
2875
2876 F8FFB1 LSTRUCT HPL
2877 _HPL .SECTION common,ref_only,offset 0 ;HPL Struct
2878 .MNLIST
2879 000000 0000 hpl_cls .DW ; parent cluster
2880 000002 0000 hpl_ix .DW ; entry index in parent cluster
2881 000004 hpl_fcb .DS 11 ; fcb name
2882 00000F 00 hpl_lst .DB ; unused
2883 000010 ESTRUCT HPL
2884 000010 HPLSIZE .DS 0
2885 ;.RELATIVE
2886 .ENDS
2887 .MNLIST
2888
2889 ;---------------------------------------------------------------------------
2890 ; Buffer Control Block (BCB) -- 16 bit offset's
2891 ;---------------------------------------------------------------------------
2892
2893 F8FFB1 LSTRUCT BCB
2894 _BCB .SECTION common,ref_only,offset 0 ;BCB Struct
2895 .MNLIST
2896 000000 0000 bcb_next .DW ; next logical linked BCB
2897 000002 00 bcb_drv .DB ; logical drive
2898 000003 00 bcb_sec .DB ; sector offset
2899 000004 0000 bcb_cls .DW ; cluster
2900 000006 0000 bcb_lba .DW ; sector lba address
Tue Jul 17 11:00:20 2018 Page 6
2901 000008 0000 bcb_lbah .DW ; lba high
2902 000008 bcb_head .EQU bcb_lbah ; floppy head
2903 00000A 0000 bcb_buf .DW ; x-mem buffer number
2904 00000A bcb_trk .EQU bcb_buf ; floppy track(low) & sector(hi)
2905 00000C 0000 bcb_ptr .DW ; buffer pointer
2906 00000E 0000 bcb_xbnk .DW ; buffer pointer hi & x-mem bank
2907 00000E bcb_dma .EQU bcb_xbnk ; buffer pointer hi & dma buffer
2908 000010 ESTRUCT BCB
2909 000010 BCBSIZE .DS 0
2910 ;.RELATIVE
2911 .ENDS
2912 .MNLIST
2913
2914 ;---------------------------------------------------------------------------
2915 ; hash Control Block (BCB) -- 16 bit offset's
2916 ;---------------------------------------------------------------------------
2917
2918 F8FFB1 LSTRUCT HCB
2919 _HCB .SECTION common,ref_only,offset 0 ;HCB Struct
2920 .MNLIST
2921 000000 0000 hcb_next .DW ; pointer to next HCB
2922 000002 0000 hcb_cls .DW ; cluster number
2923 000004 0000 hcb_seq .DW ; sequence number + logical drive number
2924 000006 0000 hcb_cnt .DW ; number of hashed entries
2925 000008 hcb_data .DS 0 ; hash buffer data
2926 000008 ESTRUCT HCB
2927 000008 HCBSIZE .DS 0
2928 ;.RELATIVE
2929 .ENDS
2930 .MNLIST
2931
2932 ;---------------------------------------------------------------------------
2933 ; TOS Working Segment
2934 ;---------------------------------------------------------------------------
2935
2936 000001 WKB .EQU .SEG.TOSSEG ; TOS working bank
2937
2938 010000 TS .SET TOSSEG
2939 01FFFF TE .SET TOSSEG + $FFFF
2940 018C00 TO0 .SET $018C00
2941 019E00 TO1 .SET TOSWKM
2942
2943 .comment @
2944 _TOS0: .SECTION ref_only, common, offset TO0, range TS TE ;FAT Struct's
2945 _TOS0_START .DS 0
2946
2947 _pbr0 .DS 512
2948 _pbr1 .DS 512
2949 _pbr2 .DS 512
2950 _pbr3 .DS 512
2951
2952 _TOS0_END .DS 0
2953 TOS0SIZ .EQU (_TOS0_END - _TOS0_START)
2954 .ENDS
2955 @
2956
2957 _TOS1: .SECTION ref_only, common, offset TO1, range TS TE ;FAT Struct's
Tue Jul 17 11:00:20 2018 Page 7
2958 019E00 _TOS1_START .DS 0
2959
2960 ; current working directory HPL
2961 019E00 cwdl0 .DS (HPLSIZE*HPLMAX)
2962 01A000 cwdl1 .DS (HPLSIZE*HPLMAX)
2963 01A200 cwdl2 .DS (HPLSIZE*HPLMAX)
2964 01A400 cwdl3 .DS (HPLSIZE*HPLMAX)
2965
2966 ; current building path HPL
2967 01A600 cbpl .DS (HPLSIZE*HPLMAX)
2968 01A600 HPL_CLS .EQU hpl_cls+cbpl
2969 01A602 HPL_IX .EQU hpl_ix+cbpl
2970 01A604 HPL_FCB .EQU hpl_fcb+cbpl
2971
2972 ; BCB list's
2973 01A800 bcbstart .DS (BCBCNT*BCBSIZE)
2974 01C800 bcbend .DS 0
2975 01C800 dmastart .DS (DMACNT*BCBSIZE)
2976 01CC00 dmaend .DS 0
2977 01CC00 dma0s .DS (17*BCBSIZE)
2978 01CD10 dma1s .DS (17*BCBSIZE)
2979
2980 01CE20 _TOS1_END .DS 0
2981 003020 TOS1SIZ .EQU (_TOS1_END - _TOS1_START)
2982 .ENDS
2983
2984 ;---------------------------------------------------------------------------
2985 ; HCB Segment
2986 ;---------------------------------------------------------------------------
2987
2988 000004 HCBBNK .EQU .SEG.HCBSEG
2989 040000 HS .SET HCBSEG
2990 04FFFF HE .SET HCBSEG + $FFFF
2991 040000 HO .SET HCBSEG
2992
2993 _HCBS: .SECTION ref_only, common, offset HO, range HS HE ;HCB's List
2994 040000 hcb_bnk .DS 8
2995 040008 hcbstart .DS 0
2996 .ENDS
2997
2998 ;.comment @
2999 ;---------------------------------------------------------------------------
3000 ; direct page for LDT var's
3001 ;---------------------------------------------------------------------------
3002
3003 ; P0OS
3004 DPOS: .SECTION page0, common, ref_only, offset 0 ;OS Main D.P.
3005
3006 ;sysbuf .DS 2 ; floppy track 0 cache buffer
3007 000000 00 defhsec .DB ; default hidden sector's in fdisk
3008 000001 00 .DB
3009 000002 0000 cmdstk .DW ; saved stack on TOS command's
3010 000004 bpath .DS 80
3011
3012 000054 bpath1 .DS 0
3013 .ENDS
3014 ;@
Tue Jul 17 11:00:20 2018 Page 8
3015
3016 ; P0LDT
3017 DPLDT: .SECTION page0, common, ref_only, offset 0 ;LDT D.P.
3018
3019 000000 ldt0 .DS LDTSIZE
3020 00002A ldt1 .DS LDTSIZE
3021 000054 ldt2 .DS LDTSIZE
3022 00007E ldt3 .DS LDTSIZE
3023 0000A8 ldt4 .DS LDTSIZE
3024
3025 0000D2 ldtp .DS 6 ; pointer to LDT's in DPLDT page
3026
3027 0000D8 sysbuf .DS 4 ; floppy track 0 cache buffer
3028
3029 .ENDS
3030
3031 ;---------------------------------------------------------------------------
3032 ; direct page for FAT var's
3033 ;---------------------------------------------------------------------------
3034
3035 ; P0FAT
3036 DPFAT: .SECTION page0, common, ref_only, offset 0 ;FAT D.P.
3037
3038 000000 0000 ostos .DW ; saved top of stack
3039 000002 00 ioerr .DB ; i/o error
3040 000003 00 ioerr2 .DB ; extended i/o error
3041 000004 0000 hcbroot .DW ; HCB struct's list
3042 000006 0000 hcblst .DW ; the last one HCB
3043 000008 00 hsiz .DB ; how many sector's an HCB can hold
3044 000009 00 hlog2 .DB ; shift count related to hsiz
3045 00000A 0000 bcbroot .DW ; BCB buffer's list
3046 00000C 0000 bcblst .DW ; the last one BCB
3047 00000E 0000 dmaroot .DW ; dma BCB buffer's list
3048 000010 0000 dmalst .DW ; the last one dma BCB
3049 000012 0000 dmabcb .DW ; BCB list for floppy root, cluster#2,#3
3050 000014 00 fspt .DB ; sector per track (floppy)
3051 000015 00 pdrive .DB ; phisycal drive number
3052 000016 00 bplvl .DB ; subdir level while build path
3053 000017 00 defdrv .DB ; default drive
3054
3055 ; the first block of ldt_ var's is copied from the LDT struct
3056 000018 00 ldtfg1 .DB ; logical volume flag's
3057 ; <7>: device ready (fdc drive or ata device)
3058 ; <6>: if=1->HD/CF else->FD
3059 ; <0>: phisycal device number
3060
3061 000019 00 ldtfg2 .DB ; <7>: valid volume (fat volume or cbm disk)
3062 ; <6>: if=1->FAT else->CBM (FD only)
3063 ; <5>: disk format checked
3064 ; <1:0>: disk format (fdc only)
3065
3066 00001A ldtfp LP ; fat table buffer long pointer
3067 00001D 00 ldtfbuf .DB ; fat table: x-mem base bank/dma buffer
3068
3069 00001E 0000 ldtroot .DW ; lba of root dir
3070 000020 0000 ldtfat1 .DW ; lba of fat1 table
3071 000022 0000 ldtfat2 .DW ; lba of fat2 table
Tue Jul 17 11:00:20 2018 Page 9
3072 000024 0000 ldtcls .DW ; lba of first data cluster
3073 000026 0000 ldtmax .DW ; max usable cluster + 1
3074 000028 00 ldtcsiz .DB ; cluster size (1,2,4,8,16,32,64)
3075 000029 00 ldtcshf .DB ; cluster shift (0,1,2,3,4,5,6)
3076 00002A 00 ldtfsiz .DB ; fat table size (if 0 -> 256)
3077 00002B 00 ldtrsiz .DB ; root dir. size (sector's)
3078 00002C 0000 ldtrent .DW ; root dir. max. entries
3079 00002E 0000 ldtcent .DW ; max. entries in dir. cluster
3080 000030 0000 ldteoc .DW ; end of cluster chain marker
3081 000032 00 ldtmcls .DB ; mask for clust. module: 00,01,03,07,0F,1F,3F
3082 000033 00 ldtfmt .DB ; floppy disk format (0,1,2, FF if ata device)
3083 000034 0000 ldtcdlp .DW ; current working dir list pointer
3084 000036 0000 ldtcdcls .DW ; current working dir start cluster
3085 000038 0000 ldtfree .DW ; count of free cluster's
3086 00003A 0000 ldtnxt .DW ; next free cluster
3087 00003C 00 ldtcdlvl .DB ; current working dir level count
3088 00003D ldtpbr LP ; long pointer to PBR cache buffer
3089
3090 000040 0000 chdcls .DW ; last accessed chained dir. cluster
3091 000042 0000 clsofs .DW ; cluster's offset from start of chain
3092
3093 ; not change order of the 2 following var's: will be accessed as 16 bit var
3094 000044 00 entofs .DB ; entry offset from start of sector
3095 000045 00 secofs .DB ; sector's offset from start of cluster
3096
3097 000046 0000 dircls .DW ; directory cluster
3098 000048 0000 dcnt .DW ; directory entry counter
3099 00004A 0000 lba .DW ; lba sector address
3100 00004C 0000 lbah .DW ; lba is 24 bit's only
3101 00004E 0000 xbuf .DW ; x-mem buffer transfer number
3102
3103 00004C fhead .EQU lbah ; fd head
3104 00004E ftrack .EQU xbuf ; fd track
3105 00004F fsec .EQU xbuf+1 ; fd sector
3106
3107 000050 00 dfcbtyp .DB ; FCB type to search
3108 000051 00 dfcbatt .DB ; attribute of found FCB
3109
3110 000052 00 curdrv .DB ; current logical drive
3111 000053 fcbs .DS 11 ; file control block name
3112
3113 ;dcmask .DW ; mask to start of cluster
3114 ; FFF0, FFE0, FFC0, FF80, FF00, FE00
3115
3116 00005E 0000 fcbp .DW ; FCB buffer long pointer
3117 000060 0000 .DW ; low=fcbp+2, high=x-mem bank or dma buffer
3118 000061 dmabuf .EQU fcbp+3 ; dma buffer #
3119 000061 xmbank .EQU fcbp+3 ; x-mem bank #
3120
3121 ; temp area
3122 000062 00 hcbseq .DB
3123 000063 00 hcbdrv .DB
3124 000064 0000 bcbcls .DW
3125 000066 00 bcbdrv .DB
3126 000067 00 bcbsec .DB
3127
3128 000068 0000 thash .DW
Tue Jul 17 11:00:20 2018 Page 10
3129 000068 hcbrec .EQU thash
3130 000068 wtmp .EQU thash
3131
3132 00006A 0000 hlast .DW
3133 00006C 0000 hcbcls .DW
3134 00006E 0000 hcbx .DW
3135 000070 0000 hcby .DW
3136 00006A tmpp .EQU hlast ; temp. long pointer
3137 00006E tmpx .EQU hcbx
3138 00006F wild .EQU hcbx+1
3139 000070 fsiz .EQU hcby
3140 000071 fptr .EQU hcby+1
3141 00006E ldrv .EQU hcbx
3142 00006F tmpldt .EQU hcbx+1
3143
3144 000072 0000 fhash .DW
3145 000074 0000 fcbofs .DW
3146 000076 00 bcbload .DB
3147 000077 00 xstart .DB
3148 000078 00 xend .DB
3149 000079 00 seccnt .DB
3150 00007A 00 maxseq .DB
3151 00007B 00 dsiz .DB
3152
3153 00007C 00 haswld .DB
3154 00007D 00 strix .DB
3155 00007E pathp LP ; long pointer to path string
3156
3157 ; TEMP
3158 000081 0000 quot .DW
3159 000083 0000 dvsor .DW
3160 000085 0000 troot .DW
3161 000087 0000 tlst .DW
3162 000089 0000 bdmask .DW
3163 00008B 0000 bcmask .DW
3164
3165 00008D 00 hcbuse .DB
3166
3167 .ENDS
3168
3172 .LIST on
3173
3174 ;---------------------------------------------------------------------------
3175 ; code segment -- bank $F9
3176 ;---------------------------------------------------------------------------
3177
3178 .CODEF9
3179 .PUBLIC oserror
3180
3181 .LONGA off
3182 .LONGI off
3183
3184 ;---------------------------------------------------------------------------
3185 ; error handler
3186 ;---------------------------------------------------------------------------
3187
3188 F92412 oserror:
Tue Jul 17 11:00:20 2018 Page 11
3189 F92412 F4 00 41 pea #P0FAT
3190 F92415 2B pld
3191 F92416 A2 00 ldx #0 ; set DBR=0
3192 F92418 DA phx
3193 F92419 AB plb
3194 F9241A INDEX16
3195 F9241A C2 10 rep #PXFLAG
3196 .LONGI on
3197 .MNLIST
3198 F9241C A6 00 ldx ostos ; restore stack pointer
3199 F9241E 9A txs
3200 F9241F INDEX08
3201 F9241F E2 10 sep #PXFLAG
3202 .LONGI off
3203 .MNLIST
3204 F92421 38 sec ; error flag
3205 F92422 60 rts
Lines Assembled : 3161 Errors : 0