This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: LDY #BATBASE LDS $00,Y LDAA NOT LDAB #$20 IN_LP2STS $00,X Loop for MEMBW[B000 + (ix20) - 2]<- BAT[i] INY INY LDS $00,Y ABX DECA BNE IN_LP2 LDX #$B017 LDAA NOT LDAB #$20 IN_LP3CLR $00,X Loop for MEMB[B000 + (ix20) - 9]<- 00 i.e. clearing ABX DECA BNE IN_LP3 CLI LDS $0101 load SPTBASE i.e. first task's SP RTI R JSR $FF7C J ISRSEI Interrupt Subroutine LDX #SPTBASE Saving SP of interrupted task DEX i.e. SPT[RT]<- SP LDAB RT LSLB DECB ABX STS $00,X INC RT RT<- RT +1 LDAA NOT Sheet1 Page 3 CMPA RT check if RT > NOT BHS SKIP CLR RT if RT > NOT then RT<- 01 else Branch to SKIP INC RT SKIPLDAB RT Load the SP of current task to be executed LSLB SP <- SPT[RT] DECB LDX #SPTBASE DEX ABX LDS $00,X L LDAA #$80 clearing Interrupt Flags STAA $1024 STAA $1025 CLI back to execution RTI END...
View Full Document
- Spring '10