comparison level2/modules/pipeman_named.asm @ 2114:ac2f5aa71f93

made certain pseudo-ops uppercase
author boisy
date Wed, 22 Aug 2007 02:22:41 +0000
parents 46c68f878889
children db97356e3648
comparison
equal deleted inserted replaced
2113:2004026c8f36 2114:ac2f5aa71f93
111 111
112 page 112 page
113 * 113 *
114 * Global equates 114 * Global equates
115 * 115 *
116 ifp1 116 IFP1
117 use defsfile 117 use defsfile
118 use pipedefs 118 use pipedefs
119 endc 119 ENDC
120 120
121 * 121 *
122 * Local Equates 122 * Local Equates
123 * 123 *
124 124
442 * Reg-U points to driver static storage. 442 * Reg-U points to driver static storage.
443 * Reg-X points to last pipe buffer checked ($0000 if 1st pipe) 443 * Reg-X points to last pipe buffer checked ($0000 if 1st pipe)
444 444
445 NewPipe ldy 10,S ;Get PD pointer 445 NewPipe ldy 10,S ;Get PD pointer
446 446
447 ifeq (PIPEDIR-YESDIR) 447 IFEQ (PIPEDIR-YESDIR)
448 lda PD.MOD,Y ;Check pipe attributes 448 lda PD.MOD,Y ;Check pipe attributes
449 bita #DIR. 449 bita #DIR.
450 beq NEWP1 450 beq NEWP1
451 451
452 * Initialize pipe characteristics for DIR. bit set 452 * Initialize pipe characteristics for DIR. bit set
453 453
454 lbsr SizDirP 454 lbsr SizDirP
455 * beq XYZZY ;Special if no pipes created 455 * beq XYZZY ;Special if no pipes created
456 endc 456 ENDC
457 457
458 * Normal (non-dir) processing 458 * Normal (non-dir) processing
459 459
460 NewP1 ldd PD.QSiz,Y ;Get max element count 460 NewP1 ldd PD.QSiz,Y ;Get max element count
461 bne DoNew ; (graceful operation if no count) 461 bne DoNew ; (graceful operation if no count)
637 637
638 * Stack clean. 638 * Stack clean.
639 * Update IOMAN variables. 639 * Update IOMAN variables.
640 * Reg-Y = where IOMAN thinks the PD is. 640 * Reg-Y = where IOMAN thinks the PD is.
641 641
642 ifeq (CAUTION-CAREFUL) 642 IFEQ (CAUTION-CAREFUL)
643 cmpy (14+IOMAGIC),S ;Make sure the stack looks right (PD matches) 643 cmpy (14+IOMAGIC),S ;Make sure the stack looks right (PD matches)
644 beq OKMagic 644 beq OKMagic
645 645
646 * Stack is wrong; declare bad magic! 646 * Stack is wrong; declare bad magic!
647 647
648 comb 648 comb
649 ldb #E$Bug 649 ldb #E$Bug
650 leas 14,S 650 leas 14,S
651 rts 651 rts
652 endc 652 ENDC
653 653
654 * Stack is right; go fix PD pointers 654 * Stack is right; go fix PD pointers
655 655
656 OKMagic ldy PP.PD,X ;Get PD pointer of existing named pipe PD. 656 OKMagic ldy PP.PD,X ;Get PD pointer of existing named pipe PD.
657 sty 10,S ;Point PD pointer at existing PD 657 sty 10,S ;Point PD pointer at existing PD
676 lda PD.CNT,Y 676 lda PD.CNT,Y
677 suba PD.Keep,Y 677 suba PD.Keep,Y
678 sta PD.CNT,Y ;Get rid of any artificial openings 678 sta PD.CNT,Y ;Get rid of any artificial openings
679 clr PD.Keep,Y 679 clr PD.Keep,Y
680 680
681 ifeq (PIPEDIR-YESDIR) 681 IFEQ (PIPEDIR-YESDIR)
682 * Handle prefill of pipe directory buffer 682 * Handle prefill of pipe directory buffer
683 683
684 lda PD.Mod,Y ;Is this a DIR. open? 684 lda PD.Mod,Y ;Is this a DIR. open?
685 bita #DIR. 685 bita #DIR.
686 beq OpnXt2 686 beq OpnXt2
687 687
688 lbsr FilDirP ;Send directory info to pipe 688 lbsr FilDirP ;Send directory info to pipe
689 endc 689 ENDC
690 690
691 OpnXt2 ldu 12,S ;Point at caller's registers 691 OpnXt2 ldu 12,S ;Point at caller's registers
692 ldd 4,S ;Get revised path name pointer 692 ldd 4,S ;Get revised path name pointer
693 std R$X,U 693 std R$X,U
694 694
1077 ldb #E$EOF ;Carry is already set 1077 ldb #E$EOF ;Carry is already set
1078 rts 1078 rts
1079 1079
1080 * Not SS.EOF. Check for SS.FD 1080 * Not SS.EOF. Check for SS.FD
1081 1081
1082 ifeq (PIPEDIR-YESDIR) 1082 IFEQ (PIPEDIR-YESDIR)
1083 NotSSEOF cmpa #SS.FD 1083 NotSSEOF cmpa #SS.FD
1084 bne NotSSFD 1084 bne NotSSFD
1085 1085
1086 * Process SS.FD 1086 * Process SS.FD
1087 1087
1088 lbsr DoSSFD 1088 lbsr DoSSFD
1089 bra G.OK ;Successful always 1089 bra G.OK ;Successful always
1090 else 1090 ELSE
1091 NotSSEOF equ * 1091 NotSSEOF equ *
1092 endc 1092 ENDC
1093 1093
1094 * Not SS.FD. Check for SS.ScSiz 1094 * Not SS.FD. Check for SS.ScSiz
1095 1095
1096 NotSSFD cmpa #SS.ScSiz ;Force UNKNOWN here 1096 NotSSFD cmpa #SS.ScSiz ;Force UNKNOWN here
1097 lbeq UnKnown 1097 lbeq UnKnown
1692 ora #%10000000 1692 ora #%10000000
1693 sta B,U 1693 sta B,U
1694 1694
1695 rts 1695 rts
1696 1696
1697 ifeq (PIPEDIR-YESDIR) 1697 IFEQ (PIPEDIR-YESDIR)
1698 1698
1699 * 1699 *
1700 * Find out how many pipes there are for the 1700 * Find out how many pipes there are for the
1701 * current device, and set up device descriptor 1701 * current device, and set up device descriptor
1702 * so that pipe buffer will hold 32 bytes of 1702 * so that pipe buffer will hold 32 bytes of
1852 * All done. 1852 * All done.
1853 1853
1854 leas (16+5),S 1854 leas (16+5),S
1855 puls U,X,Y,D,PC 1855 puls U,X,Y,D,PC
1856 1856
1857 endc 1857 ENDC
1858 1858
1859 emod 1859 emod
1860 1860
1861 MODSIZE equ * 1861 MODSIZE equ *
1862 1862