;create list1 with matdim+1 elements ;matD,matC -> list1 ;round(abs(list1)) -> list1 ;gcd(list1) -> list1 ;dsp list1 listPage: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;create list1 with matdim+1-rij1en elements ld hl, list1 b_call (_mov9toop1) ld h, 0 ld a, (listlength) ld l, a b_call (_createRlist) inc de inc de push de ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;matD,matC -> list1 ld hl, matD b_call (_mov9toop1) b_call (_findsym) inc de inc de ld a, (listLength) dec a ld h, 0;bc = a x 9 ld l, a call hlx9 ld b, h ld c, l ex de, hl pop de;de = list1pos, hl = matD pos, bc = length matd in bytes ldir push de ld hl, matC b_call (_mov9toop1) b_call (_findsym) inc de inc de ex de, hl ld bc, 9 pop de ldir ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;round(abs(list1)) -> list1 ;gcd(list1) -> list1 ld hl, list1 b_call (_mov9toop1) b_call (_findsym) push de ld a, opAbs b_call (_unopexec) ld a, opRound2 b_call (_unopexec) b_call (_findsym) inc de inc de pop hl ld c, (hl) inc hl ld b, (hl) inc hl push hl ld h, b ld l, c call hlx9 ld b, h ld c, l pop hl push hl ex de, hl ldir pop de ex de, hl push hl b_call (_mov9toop1) b_call (_pushop1) ld a, (listLength) push af; gcdloop: pop af dec a jr z, gcdloop_ pop hl ld de, 9 add hl, de push hl push af b_call (_mov9toop1) ld a, opgcd b_call (_binopexec) b_call (_pushop1) jr gcdloop gcdloop_: pop hl;junk b_call (_popop3) ld hl, list1 b_call (_mov9toop1) b_call (_findsym);waarom is deze regel nodig? b_call (_pushop1) b_call (_op3toop1) ld a, opDiv b_call (_binopexec) b_call (_findsym) inc de inc de push de ld hl, list1 b_call (_mov9toop1) b_call (_findsym) inc de inc de ld a, (listLength) ld h, 0 ld l, a pop bc;zit ervoor push hl push bc;weer trug call hlx9 ld b, h ld c, l pop hl push hl ldir ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;dsp list1 ld hl, 0 ld (penCol), hl b_call (_clrlcdfull) pop hl pop bc ld b, c ld a, (matsignchange);moet worden omgedraaid, omdat b ook van hoog naar laag gaat ld c, a ld a, b sub c inc a ld c, a push hl;list start draw: push bc b_call (_mov9toop1) push hl b_call (_pushop1) errhandon(overflow3) b_call (_convop1) errhandoff() ld hl, 0 or a sbc hl, de jr z, notsolveable ; call debugde overflow3: b_call (_popop1) dontcheck: ld a, 8 b_call (_dispop1a) ld a, (penCol) cp 80 call nc, penNewLine pop hl;list1 val pointer pop bc ld a, c cp b jr nz, drawgeenpijl ld a, $1c b_call (_vputmap) ld a, (penCol) add a, 2 ld (penCol), a cp 80 call nc, penNewLine drawgeenpijl: ;(cl004) laatste: djnz draw call checkValidSolution checkValidSolutionBack: call clearAllUserVars b_call (_getkey) cp kTrace jp z, _end jp menu2 notsolveable: ld hl, errnotsolveablemsg call dspMsg jp menu2