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.

lccinit.src 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. ;--------9/25 rom05-bc-------------
  36. lda #0
  37. sta t1ll2
  38. lda #tim ; / 8 ms /irq
  39. sta t1hl2
  40. sta t1hc2 ; get 6522's attention
  41. ;----------------------------------
  42. ;
  43. lda #$7f ; clear all irq sources
  44. sta ier2
  45. ;
  46. lda #$80+$40
  47. sta ifr2 ; clear bit
  48. sta ier2 ; enable irq
  49. ;
  50. ;
  51. lda #$ff ; no current drive
  52. sta cdrive
  53. sta ftnum ; init format flag
  54. ;
  55. lda #$08 ; header block id
  56. sta hbid
  57. ;
  58. lda #$07 ; data block id
  59. sta dbid
  60. ;
  61. lda #<inact
  62. sta nxtst
  63. lda #>inact
  64. sta nxtst+1
  65. ;
  66. lda #200
  67. sta minstp
  68. ;
  69. lda #4
  70. sta as
  71. ;
  72. lda #$4
  73. sta af
  74. ;
  75. ;.end