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.src 1.8KB

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