A85: @!#%! Code Part 2


[Prev][Next][Index][Thread]

A85: @!#%! Code Part 2




Here's more of my seemingly defective source code.  I am trying to initialize
a portion of memory to use as a 2 dimensional array with all zeros, but it
crashes the calc all the time.

ARRAY = TEXT_MEM+5

 call CLEARLCD
 ld a,1
 ld (CUR_POS),a
Loop:
 ld b,9
 ld hl,(ARRAY)
 ld a,b
 push bc
 ld b,0
 ld c,a
 add hl,bc
 pop bc
 ld (hl),0
 djnz Loop
Loop2:
 ld b,6
 ld hl,(ARRAY)
 push bc
 ld b,0
 ld c,9
 add hl,bc
 pop bc
 ld c,b
 push bc
 ld b,0
 add hl,bc
 ld (hl),0
 djnz Loop2 

-Gray


Follow-Ups: