***************************************************************************** ColScreen: move.b #!BC, ah ;Where to print. move.w #17, bx ;The depth. move.w #30, cx ; bsr.w DrawBox ; lea 164(di), di ; push.w di ;Save DI. move.w #CString, dx ;Print a string for the user. _Col_lp: push.w di ;Save DI. move.b #!BC, ah bsr.w Print_String ; move.b #2, cl ;How many nibbles to print. bsr.w Print_Hex ;Print the hex value. lea 4(di), di ; move.b bl, ah ;The colour. move.b #219, al ;A blank. stos.w stos.w pop di ;Restore DI. lea 160(di), di ;Move next line. inc.b bl ;Move next. cmp.b #15, bl ;Finished? bne.s _Col_lp ;Loop if not done. ***************************************************************************** push.w ds push.w es move.w cs, ax move.w ax, ds move.w ax, es move.w #11, cx ;The count. move.w #PALETTE, si :Where to move data from. move.w #StackBot, di ;The unused stack area. dc.b $66 repne:movs.w pop.w es pop.w ds ***************************************************************************** pop.w di ;Get the screen position. lea 32(di), di ;Move to our offset. cs:move.b #0, ColPos ;Set the highlight. bra.s ColCursorSet ; *-+-* ColSetLoop: move.w #StackBot, si bsr.w _Set_Palette ColCursorSet: bsr.w _Print_Cols ColKeyWait: bsr.w Get_KeyStroke or.w ax, ax beq.s ColKeyWait *-+-* move.w #ColRoutine, si ;Our routine list. ColRoutLoop: cs:cmp.w ax, (si) ;Check for keycode match. beq.s IncDecFix ;Jump to the routine. lea 6(si), si ;Move to the next compare. cs:cmp.w #0, (si) ;Check for end of List. bne.s ColRoutLoop ;Loop again if not end. *-+-* cmp.b #$01, ah bne.s ColKeyWait ***************************************************************************** ColCheckSave: move.b #2, cl move.w #SString, dx ; bsr.w DrawInfoBox rts ***************************************************************************** IncDecFix: cs:move.w 2(si), bx ;Get the address of the variable. cs:cmp.w #ColPos, bx ;Check wich variable. beq.s SetColPos ;Setting the position. cs:add.w ColPos, bx ;Setting the colour. SetColPos: cs:move.b (bx), al ;Get the variable value. cs:add.b 4(si), al ;Add our (In/De)crease value. cmp.b #0, al ;Check fo below zero. blt.s ColKeyWait ; cs:cmp.b al, 5(si) ;Check for greater than max. blt.s ColKeyWait ; cs:move.b al, (bx) ;Save it. bra.s ColSetLoop ***************************************************************************** _Print_Cols: eor.w bx, bx ;Our colour number. _Print_Cols_Lp: push.w di push.w bx ;Save BX. move.w bx, ax ; cs:div.b DIV3 ; move.b ah, cl ; and.w #$FF, cx ; shl.w #1, cx ; add.w cx, di ; shl.w #1, cx ; add.w cx, di ; and.w #$FF, ax ; move.w ax, cx ; shl.w #2, ax ; add.w cx, ax ; shl.w #5, ax ; add.w ax, di ; move.b #!BC, ah ;The colour. cs:cmp.b ColPos, bl bne.s _No_Col move.b #!BH, ah _No_Col: cs:move.b StackBot(bx), bl ;Get the byte. move.b #2, cl ;The number of nibbles to print. bsr.w Print_Hex ;Print the value. pop.w bx ;Restore BX. pop.w di ;Get the screen position. inc.b bl cmp.b #45, bl bne.s _Print_Cols_Lp rts ***************************************************************************** ColRoutine dc.w $48E0,ColPos,$2CFD dc.w $50E0,ColPos,$2C03 dc.w $4BE0,ColPos,$2CFF dc.w $4DE0,ColPos,$2C01 dc.w $91E0,StackBot,$3FFF dc.w $8DE0,StackBot,$3F01 dc.w 0 CString dc.b "Colour: ",0 SString dc.b "Save to disk? ",0 DIV3 dc.b 3 ColPos ds.w 1 *****************************************************************************