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.

leds.src 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .page 'leds'
  2. ;
  3. ;turn on activity led specified
  4. ; by drvnum
  5. ;
  6. setlds sei
  7. lda #$ff-led1-led0
  8. and ledprt
  9. pha
  10. lda drvnum
  11. beq leds0
  12. pla
  13. ora #led1
  14. bne leds1
  15. leds0
  16. pla
  17. ora #led0
  18. leds1
  19. sta ledprt
  20. cli
  21. rts
  22. ;
  23. ledson sei
  24. lda #led1+led0
  25. ora ledprt
  26. sta ledprt
  27. cli
  28. rts
  29. ;
  30. erroff
  31. lda #0
  32. sta erword
  33. sta erled
  34. rts
  35. ;
  36. erron sei
  37. txa
  38. pha ; save .x
  39. lda #80
  40. sta erword
  41. ldx #0
  42. ;lda drvnum ;for 2 drives
  43. ;and #1
  44. ;tax
  45. lda ledmsk,x
  46. sta erled
  47. ora ledprt ; set led on
  48. sta ledprt
  49. pla
  50. tax ; restore .x
  51. cli
  52. rts
  53. ; .end