User Tools

Site Tools


base:nmi_lock_without_kernal
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


base:nmi_lock_without_kernal [2016-10-05 12:05] (current) – created sokrates
Line 1: Line 1:
 +====== NMI Lock Without Kernal ======
  
 +Modification of the example given at [[base:nmi_lock|NMI lock]]. The NMI is locked without using kernal routines and without using RAM at $0318/$0319.
 +
 +<code>
 +  ; 'Disable NMI' without using kernal and $0318/$0319 by Sokrates
 +
 +  sei  ;; switch off interrupt
 +  lda #$35 ;; all RAM except D000-Dfff 
 +  sta $01  ;; write to $FFFA/$FFFB now possible
 +  lda #<nmiRoutine ;; change nmi vector to nmiRoutine
 +  sta $FFFA      
 +  lda #>nmiRoutine
 +  sta $FFFB
 +  lda #$00  ;; stop Timer A
 +  sta $DD0E 
 +  sta $DD04 ;; set Timer A to 0, after starting
 +  sta $DD05 ;; NMI will occur immediately
 +  lda #$81  
 +  sta $DD0D ;; set Timer A as source for NMI 
 +  lda #$01  
 +  sta $DD0E ;; start Timer A -> NMI
 +  ;; from here on NMI is disabled
 +  ...
 +
 +nmiRoutine
 +  rti ;; exit interrupt not acknowledged 
 +</code>
base/nmi_lock_without_kernal.txt · Last modified: 2016-10-05 12:05 by sokrates