Skip to main content
Became Hot Network Question
Became Hot Network Question
Became Hot Network Question
indent code for readability
Source Link
user3840170
  • 25.2k
  • 4
  • 100
  • 160

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

      ORG $300
HOME  EQU $FC58
CTR   EQU $06
COUT  EQU $FDED

START JSR HOME
      LDA #$FF
      STA CTR
LOOP  LDA CTR
      JSR COUT
      DEC CTR
      BEQ END
      JMP LOOP
END   RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

ORG $300
HOME EQU $FC58
CTR EQU $06
COUT EQU $FDED

START JSR HOME
LDA #$FF
STA CTR
LOOP LDA CTR
JSR COUT
DEC CTR
BEQ END
JMP LOOP
END RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

      ORG $300
HOME  EQU $FC58
CTR   EQU $06
COUT  EQU $FDED

START JSR HOME
      LDA #$FF
      STA CTR
LOOP  LDA CTR
      JSR COUT
      DEC CTR
      BEQ END
      JMP LOOP
END   RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

fixed a few typos from where I transcribed code off my Apple II
Source Link

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

ORG $300
HOME EQU $FC58
CTR EQU $06
COUT EQU #FDBD$FDED

START JSR HOME
LDA #$FF
STA CTR
LOOP LDA CTR
JSR COUT
DEC CTR
BEQ END
JMP LOOP
END RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

ORG $300
HOME EQU $FC58
CTR EQU $06
COUT EQU #FDBD

START JSR HOME
LDA #$FF
STA CTR
LOOP LDA CTR
JSR COUT
DEC CTR
BEQ END
JMP LOOP
END RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

ORG $300
HOME EQU $FC58
CTR EQU $06
COUT EQU $FDED

START JSR HOME
LDA #$FF
STA CTR
LOOP LDA CTR
JSR COUT
DEC CTR
BEQ END
JMP LOOP
END RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!

Source Link

Apple IIe Enhanced not following BEQ correctly

I'm running the example code from Assembly Lines chapter 5 programs 2A and 2B which print the entire character map for the Apple II and then are supposed to break, however my code is looping permanently. Here is the code:

ORG $300
HOME EQU $FC58
CTR EQU $06
COUT EQU #FDBD

START JSR HOME
LDA #$FF
STA CTR
LOOP LDA CTR
JSR COUT
DEC CTR
BEQ END
JMP LOOP
END RTS

I have double checked the book and don't think I mistyped anything but the program just loops over and over, almost like the zero flag isn't ever properly set. I know the zero flag works for dex and dey because I've used those for loop counters in prior exercises.

Thanks!