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\sysf9.asm
Output Filename : obj\F9\sysf9.obj
Listing Has Been Relocated
2457 .LIST on
2458
2459 ;---------------------------------------------------------------------------
2460 ; direct-page working area for filesystem managment
2461 ;---------------------------------------------------------------------------
2462
2463 DPFSW: .SECTION page0, ref_only, common ;Direct Page f.s. working area
2464
2465 000000 .ABSOLUTE ;; start always at $00
2466 000000 .ORG 0x00
2467
2468 ;---------------------------------------------------------------------------
2469 ; this section is copied from the PDT of selected drive
2470 ; note: in the LBA address we assume that the MSB 4 bit are all '0'
2471 000000 00 fdrvfg .DB ; <7>: H.D. (1) / F.D. (0)
2472 ; <6>: 1440k (1) / 720k (0) if <7> = 1
2473 000001 00 ffsfg .DB ; <7>: FAT (1) / CBM (0)
2474 000002 00 fclusiz .DB ; cluster size in # sector's (1,2,4,8,10,20,40)
2475 000003 00 fclush .DB ; shift cluster (0,1,2,3,4,5,6)
2476 000004 00 fatsiz .DB ; FAT table size in # sector's (0 = 256 sect.)
2477 000005 00 frootsiz .DB ; root directory size in # sector's
2478 000006 0000 frootent .DW ; root directory # entries
2479 000008 ffat1lba .DS 3 ; LBA of FAT 1 starting
2480 00000B ffat2lba .DS 3 ; LBA of FAT 2 starting
2481 00000E frootlba .DS 3 ; LBA of root directory starting
2482 000011 fclulba .DS 3 ; LBA of first cluster (cluster #2)
2483 000014 0000 fclucnt .DW ; # of cluster's in FAT volume
2484 000016 0000 fclufree .DW ; the count of free cluster's
2485 000018 0000 fclunxt .DW ; the next free cluster #
2486 00001A 0000 fcdclu .DW ; cluster # where starting c.d.
2487 00001C 0000 fcdparent .DW ; cluster # parent of the c.d.
2488 00001E 0000 fcdparx .DW ; index entry on parent cluster of c.d.
2489 000020 00 fcdlen .DB ; lenght of current directory string
2490 ; c.d. string start with '/', w/o trailing '/'
2491 000021 00 fcdlst .DB ; index of last '/' in c.d. string
2492
2493 ;---------------------------------------------------------------------------
2494
2495 000022 FPathStr .DS 2
2496
2497 000024 fpaths .DS 78 ; path string (without starting 'X:')
2498 000072 00 fdrive .DB ; the drive used in current operation
2499 000073 00 fdefdrv .DB ; default drive (the one currently selected)
2500 000074 00 fexpfg .DB ; <7>: fexpand file name (1) / directory (0)
2501 ; <6>: local calls to fexpand (1)
2502 000075 00 devfg .DB ; <7>: specified a device name in path
Tue Jul 17 11:00:20 2018 Page 2
2503 000076 00 devidx .DB ; index of device
2504 000077 00 haswild .DB ; <7>: path contain wildcards
2505 000078 00 fdrvlst .DB ; last operative drive ($FF mean invalid)
2506 000079 fpdtp LP ; long pointer to PDT of fdrive
2507 00007C 00 storfg .DB
2508 00007D 00 wildfg .DB
2509 00007E 00 dotfg .DB
2510 00007F 00 maxcnt .DB
2511 000080 00 cnt .DB
2512 000081 00 cnt1 .DB
2513 000082 00 cntx .DB
2514 000083 LPtr1 LP
2515 000086 LPtr2 LP
2516 000089 00 FDirIdx .DB
2517 ;FPathStr .DS 2
2518 00008A CDLen .DS 6
2519 000090 00 lstidx .DB
2520 000091 00 FEndDir .DB
2521 000092 tmpfcb .DS 16
2522 0000A2 LPtr3 LP
2523
2524 0000A5 .RELATIVE
2525
2526 .ENDS
2527
2528 ;---------------------------------------------------------------------------
2529
2593 .LIST on
2594
2595 F8FFB1 .INCLUDE inc\dirp00.inc
2596 ;----------------------------------------------------------
2597 ; DIRP00.ASM
2598 ; PROGETTO: B1601
2599 ;
2600 ; Variabili in Direct Page $00
2601 ;----------------------------------------------------------
2602
2603 ; sezione COMMON -- questo permette di includere il file in piu' file
2604
2605 .LIST on
2606
2607 DIRP00: .SECTION page0, ref_only, common ;Direct-Page 00
2608
2609 000000 .ABSOLUTE ;; inizia sempre da $00
2610 000000 .ORG 0x00
2611 000000
2612 000000 0000 JiffyClk .DW ; contatore 10ms 32 bit
2613 000002 0000 .DW
2614 000004 SysTmr .DS SYSTMRCNT ; system timer 0 (10ms)
2615 000008 SysTMF .DS SYSTMRCNT ; flag timer (80 -> start)
2616 00000C 00 Bnk0Flag .DB ; <7>: flag test RAM banco 0 ok
2617 ; <6>: flag warm reset
2618 00000D 00 RTCFlag .DB
2619
2620 00000E diskstat .DS 2 ; flag device on ata bus #0 & #1
2621 ; <7>: device ready
2622 ; <6>: compact flash device (C.F.)
Tue Jul 17 11:00:20 2018 Page 3
2623 ; <5>: device identification ok
2624 ; <4>: MBR loaded
2625 ; <3>: valid signature in MBR
2626 ; <2>: first partition found&active
2627 ; <1>:
2628 ; <0>: valid partition flag
2629
2630 ; <7>: device ready
2631 ; <6>: USB device
2632 ; <5>: compact flash device (C.F.)
2633 ; <4>: device identification ok
2634 ; <3>: MBR loaded
2635 ; <2>: first partition found&active
2636 ; <1>: always 1
2637 ; <0>: valid partition flag
2638 000010
2639
2640 00000E atadev .EQU diskstat
2641
2642 000010 usbdev .DS 2 ; flag flash disk on usb bus #0
2643 ; <7>: device plugged and ready
2644 ; <6>: always 1
2645 ; <5>: device identification ok
2646 ; <4>: MBR loaded
2647 ; <3>: valid signature in MBR
2648 ; <2>: first partition found&active
2649 ; <1>:
2650 ; <0>: valid partition flag
2651
2652 000012 diskmax .DS 16 ; disk max. sector's
2653 000012 atasec .EQU diskmax
2654 00001A usbsec .EQU diskmax+8
2655
2656
2657 000022 atambr .DS 8 ; data for first partition found in mbr
2658 ; first 3 bytes for start sector of partition
2659 ; last byte for partition type
2660 00002A usbmbr .DS 8
2661
2662 000032 ataprt .DS 8 ; total sec's of first partition
2663 00003A usbprt .DS 8 ; total sec's of first partition
2664
2665
2666 000042 00 usb0ch .DB ; usb0 (ch375/ch376) flag
2667 ; <7>: module on
2668 ; <6>: ch376 flag
2669 ; <5:0>: chip version
2670
2671 000043 00 usb0st .DB ; usb0 status
2672 ; <7>: usb0 host mode ok
2673 ; <6>: flash disk attached flag
2674 ; <5>: usb device attached
2675
2676 000044 00 fdcdrv .DB ; phisycal drive status (drive #0)
2677 ; <7>: disk format established in bit 0&1
2678 ; <6>: double step seek done
2679 ; <5>: trust format bit's (set after ok r/w)
Tue Jul 17 11:00:20 2018 Page 4
2680 ; <4>: write protect bit (if disk in drive)
2681 ; <3>: don't care
2682 ; <2>: don't care
2683 ; <1>: HD disk if set else DD disk
2684 ; <0>: CBM format if set else IBM format
2685
2686 000045 00 vdrive .DB ; virtual drive status (ram disk, drive #1)
2687 ; <7>: disk format established in bit 0&1
2688 ; <6>: change disk simulation (after format)
2689 ; <5>: don't care
2690 ; <4>: write protect bit (under sw control)
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 000046 00 fdcctl .DB ; fdc controller status
2697 ; <7>: drive is attached
2698 ; <6>: drive need recalibration (restore)
2699 ; <5>: FDC controller ok
2700 ; <4>: motor on
2701 ; <3>: dma is active
2702 ; <2>: dma chip ok (post routine)
2703 ; <1>: clock rate (1=HD,0=DD)
2704 ; <0>: disk ready
2705
2706 000047 00 fdctrk .DB ; fd: current seek track
2707 000048 00 fdcerr .DB ; fd: last error code
2708 000049 00 ataerr .DB ; ata: last error code
2709 00004A 00 ataxer .DB ; ata: last extended error code
2710
2711 00004B 00 CtrlBrk .DB ; flag CTRL+BREAK (NMI)
2712
2713 00004C 0000 MemTop .DW ; top memoria RAM
2714 00004E 00 .DB ; banco top mem
2715
2716 00004F 00 DflTxtIn .DB ; device di default text input
2717 000050 00 DflTxtOut .DB ; device di default text output
2718
2719 000051 COPPtr LP ; long pointer for COP decoding
2720 000054 00 COPIdx .DB ; COP signature/index
2721
2722 000055 00 BiosEnt .DB ; flag accesso a bios setup
2723
2724 ; variabili utilizzate da ACIA
2725 000056 spwrk .DS $30
2726
2727 ; bios mem
2728 000086 0000 nsize .DW ; dimensione blocco da allocare
2729 ;bsize .DW ; dimensione vera blocco free
2730 000088 0000 splitsz .DW ; dimensione blocco splittato
2731 00008A 0000 bfree .DW ; puntatore blocco free
2732 00008C 0000 hdrptr .DW ; puntatore header heap
2733
2734 00008E 0000 pbrklv .DW ; current break level of current process
2735 000090 0000 pbrkmin .DW ; minimum breal level of current process
2736 000092 0000 pbrkmax .DW ; maximum breal level of current process
Tue Jul 17 11:00:20 2018 Page 5
2737 000094
2738 ; bios temp. work area
2739 000094 bwrktmp .DS $28
2740
2741 0000BC 00 coptmp .DB ; temp. used while cop
2742
2743 0000BD 00 tstser .DB ; check ser/usb test board post
2744 ; <7>: VIA2 ok
2745 ; <6>: PICRAM ok
2746 ; <1>: UART 16C550 ok
2747 ; <0>: R65C51 ok
2748
2749
2750 ;crc16 .DW
2751
2752 0000BD .RELATIVE
2753
2754 .ENDS
2755
2756 [01] .IFDEF _ACIA_INC_
2757 .INCLUDE INC\SP.INC
2758 [00] .ENDIF
2759
Lines Assembled : 2855 Errors : 0