You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tstflg 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .PAGE 'TSTFLG'
  2. ;*
  3. ;*
  4. ;**********************************
  5. ;*
  6. ;* SCFLG
  7. ;* SETFLG
  8. ;* CLRFLG
  9. ;* TSTFLG
  10. ;*
  11. ;*********************************
  12. ;*
  13. ;*
  14. SCFLG BCC CLRFLG
  15. ;
  16. SETFLG LDX LINDX
  17. ORA FILTYP,X
  18. BNE CLRF10
  19. ;
  20. CLRFLG LDX LINDX
  21. EOR #$FF
  22. AND FILTYP,X
  23. CLRF10 STA FILTYP,X
  24. RTS
  25. ;
  26. ;
  27. TSTFLG LDX LINDX
  28. AND FILTYP,X
  29. RTS
  30. ;
  31. ;*
  32. ;*
  33. ;******************************
  34. ;*
  35. ;*
  36. ;* TSTWRT
  37. ;*
  38. ;******************************
  39. ;*
  40. ;*
  41. TSTWRT JSR GETACT
  42. TAX
  43. LDA LSTJOB,X
  44. AND #$F0
  45. CMP #$90
  46. RTS
  47. ;*
  48. ;*
  49. .PAGE 'TEST CHANNEL'
  50. ;
  51. ; TEST FOR ACTIVE FILES FROM
  52. ; LINDX TABLE
  53. ;
  54. ; C=1 FILE NOT ACTIVE X=18,Y=?,A=?
  55. ; C=0 FILE ACTIVE X=ENTFND,Y=LINDX,A=?
  56. ;
  57. ;
  58. TSTCHN LDX #0 ;START SEARCH AT TOP
  59. TSTC20 STX TEMP+2 ;SAVE TO LOOK ON
  60. LDA LINTAB,X ;GET LINDX
  61. CMP #$FF
  62. BNE TSTC40 ;IF PLUS TEST IT
  63. TSTC30 LDX TEMP+2 ;NOT ACTIVE
  64. INX
  65. CPX #MAXSA-2 ;SEARCHED ALL
  66. BCC TSTC20 ;NO
  67. TSTRTS RTS ;YES
  68. ;
  69. ;
  70. TSTC40 STX TEMP+2 ;SAVE X
  71. AND #$3F
  72. TAY ;USE LINDX AS INDEX
  73. LDA FILTYP,Y ;RIGHT DRIVE # ?
  74. AND #1
  75. STA TEMP+1
  76. LDX ENTFND ;INDEX ENTRY FOUND
  77. LDA FILDRV,X
  78. AND #1
  79. CMP TEMP+1 ;SAME DRIVE # ?
  80. BNE TSTC30 ;NO
  81. LDA DSEC,Y ;YES - SAME DIR. ENTRY ?
  82. CMP ENTSEC,X
  83. BNE TSTC30 ;NO
  84. LDA DIND,Y
  85. CMP ENTIND,X
  86. BNE TSTC30 ;NO
  87. CLC ;SET FLAG
  88. RTS
  89. ;
  90. ;
  91. ;
  92. .END