atomDetails: b_call (_clrlcdfull) res fracdrawlfont, (iy + fontflags) call stackClearAll ld a, 3 ld (methode), a jp equation2 atomDetailsBack: ;we kunnen heel appBackUpScreen(eerste 256bytes lijkt me toch niet) gebruiken, ;gebruik makend van 2 stacks: stTblAtom, stTblAtomQt call draaiom ;aba: ; ld hl, sttblatom ; call stackarpop ; call debuga ; jr aba ld hl, 0 ld (penCol), hl nextAtom: ld hl, sttblatomQt call stackarPopDe;keep same index ld hl, sttblatom call stackarpop cp 250 jr z, nextAtom cp 0 jr z, nextAtom_ cp 150 jr nz, geenLading ;lading kun je gebruiken als je alleen atomnr heb ld a, e cp 110 jr nc, nextAtom;atoms boven 110 geen gegevens van or a jr z, nextAtom;nul ook niet geenLading: ld c, a;dspAtomNr en andere functies gebruiken C om atomNr op te halen ld a, (penRow) cp 64-7 +1;check einde scherm jr c, nogOpScherm ld hl, $0F07 ld (curRow), hl ld a, $F0 b_call (_putmap) b_call (_getkey) xor a ld (penRow), a push bc b_call (_clrlcdfull) pop bc nogOpScherm: call dspAtomNr ld a, 3*4+2 ld (penCol), a call dspAtomAbb ld a, (3*4+2) + (2*4+4) ld (penCol), a call dspAtomName xor a ld (penCol), a ld a, (penRow) add a, 8 ld (penRow), a jr nextAtom nextAtom_: b_call (_getkey) cp kTrace jp z, _end atomDetailsBackError: ;a = keycode (alst goed is) ;cp kGraph ;jr z, get b_call (_clrlcdfull) ret dspNumber199: cp 200 ret nc ld c, a dspAtomNr: ;c = atomNr ld a, c ld b, a cp 100 jr c, smaller ld a, $31 b_call (_vputmap) ld a, b sub 100 ld b, a jr morethan10 smaller: cp 10 jr c, smaller2 morethan10: ld h, 0 ld l, a ld d, 10 call hldivd ld b, a ld a, $30 add a, l b_call (_vputmap) ld a, b smaller2: ld a, $30 add a, b b_call (_vputmap) ret dspAtomAbb: ;c = atomNr ld h, 0 ld l, c add hl, hl ld de, atomList - 2 add hl, de ld a, (hl) b_call (_vputmap) inc hl ld a, (hl) cp 1 ret z b_call (_vputmap) ret dspAtomName: ;c = atomNr ld hl, atomNames - 1 ld b, 0 atomNamesLoop: inc hl ld a, (hl) or a jr nz, atomNamesLoop inc b ld a, b cp c jr nz, atomNamesLoop inc hl call vputc ret