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.

74 lines
982B

  1. .PAGE 'LCC.INIT'
  2. ;
  3. ;
  4. ;
  5. ; INITIALIZATION OF CONTROLLER
  6. ;
  7. ;
  8. ;
  9. CNTINT LDA #%01101111 ; DATA DIRECTION
  10. STA DDRB2
  11. AND #$FF-$08-$04-$03 ; TURN MOTOR OFF,SET PHASE A, LED OFF
  12. STA DSKCNT
  13. ;
  14. ;
  15. LDA PCR2 ; SET EDGE AND LATCH MODE
  16. AND #$FF-$01 ; NEG EDGE PLEASE
  17. ;
  18. ;
  19. ; CA2: SOE OUTPUT HI DISABLE S.O. INTO 6502
  20. ;
  21. ORA #$0E
  22. ;
  23. ;
  24. ; CB1 INPUT ONLY
  25. ;
  26. ; CB2 MODE CONTROL R/W
  27. ;
  28. ORA #$E0
  29. STA PCR2
  30. ;
  31. ;
  32. LDA #$41 ; CONT IRQ, LATCH MODE
  33. STA ACR2
  34. ;
  35. LDA #0
  36. STA T1LL2
  37. LDA #TIM ; 20 MS /IRQ
  38. STA T1HL2
  39. STA T1HC2 ; GET 6522'S ATTENTION
  40. ;
  41. LDA #$7F ; CLEAR ALL IRQ SOURCES
  42. STA IER2
  43. ;
  44. LDA #$80+$40
  45. STA IFR2 ; CLEAR BIT
  46. STA IER2 ; ENABLE IRQ
  47. ;
  48. ;
  49. LDA #$FF ; NO CURRENT DRIVE
  50. STA CDRIVE
  51. STA FTNUM ; INIT FORMAT FLAG
  52. ;
  53. LDA #$08 ; HEADER BLOCK ID
  54. STA HBID
  55. ;
  56. LDA #$07 ; DATA BLOCK ID
  57. STA DBID
  58. ;
  59. LDA #<INACT
  60. STA NXTST
  61. LDA #>INACT
  62. STA NXTST+1
  63. ;
  64. LDA #200
  65. STA MINSTP
  66. ;
  67. LDA #4
  68. STA AS
  69. ;
  70. LDA #$4
  71. STA AF
  72. ;
  73. .END