Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Write a program loop using a pointer and a counter toclear the contents of hex locations 500 to 5FF with 0.

LDA NBR / Initialize counter
CMA / 2’s complement of NBR INC
STA CTR / save -NBR to counter
LDA ADR / Save start address
STA PTR / Initialize pointer PTR
LOP, CLA / Clear AC
STA PTR I / Reset memory word
ISZ PTR / Increment pointer
ISZ CTR / increment counter
BUN LOP / Branch to LOP (CTR < 0)
HLT / Halt when CTR = 0
NBR, HEX FF / NBR of cleared words
CTR, – / Counter
ADR, HEX 500 / Start address
PTR, – / Pointer

Leave a Comment