Download Telefunken RT200
Transcript
call mov mov mov mul mov segtranslate dispdata+3,a a,r0 b,#10 ab r4,a call xrl jnz call jc mov call mov mov add mov clr getmode a,r3 fail readnum loop4 r0,a segtranslate dispdata+4,a a,r0 a,r4 r4,a c done: pop ret reg0 fail: setb sjmp c done loop4: ; display ; store to minutes ; bail out? ; get last number ; all digits 0..9 valid :-) ; save back to minutes ; end with success ; end without success endp ;--------------------------------------------------------------------------; convert key in A to number in A done: proc key2num clr subb cpl jc c a,#10 c done ; ; ; ; add mov div mov clr a,#11 b,#10 ab a,b c ; keys 1..9 are now correct ; now get the 10->0 with a modulo op numeric keys have values from 0..9 i.e. we should get a borrow now if not... ...forget it ; done ret endp ;--------------------------------------------------------------------------; clear numeric display proc clrdisp clr mov mov mov mov mov clr clr a dispdata+1,a dispdata+2,a dispdata+3,a dispdata+4,a dispdata+5,a KHZ MHZ ; no comment ;-) ret endp ;--------------------------------------------------------------------------; write message at (DPTR) to display