Palm Pilot Programming Question

The following code is to convert ASCII-hex to integer



CVT4

move.l a0,a3

systrap StrLen(a0.l)

move.w d0,d2

subq.l #1, d2

sub.l d0,d0



CVT41

lsl.l #4, d0

move.b (a3)+d1

sub.b #'0', d1

cmp.b #9, d1

ble CVT42



(and I am not sure what the following 4 line do? can anyone

explain?)



sub.b #7, d1

cmp.b #$f, d1

ble CVT 42

sub.b #$20, d1



CVT42

or.b d1,d0

dbra d2, CVT41

cmp.l #$10000,d0

blt CVT5



systrap FrmAlert (#kidrRangeErrorAlert.w)

bra CVTReturn





and how can I modify the above code so it can convert ASCII character to

integer?



Thank you very much

I am very appreciate for those who take time to help me






Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories