Re: need help in adding numbers and displaying them




wolfgang kern wrote:
> "Betov" answered to lonetunes@xxxxxxxxx on "randyhyde@xxxxxxxxxxxxx" spam.
>
>
> | > As it provides lots of resources for learning assembly language
> | > programming
>
> | Keep carefully away from that ***.
>
> Yes, don't fall into the trap of nonsense.
> It just teaches how to create bloated code on behalf of making
> the source readable/understandable for the simple minded 'great teacher'.

Yes. Writing incomprehensible and unreadable code is what Wolfgang
would much rather have you do. :-) No doubt, this is the type of
"tight" code that Wolfgang would prefer that you write (taken from his
"Kesys" program):

MainWindowProc: ;esp+00=ret +04=hdl +08=msg +0c=wP +10=lP
pushad
; mov edx D$esp+024 ;hdl
mov eax D$esp+028 ;msg
mov ebx D$esp+02c ;wP
; mov ecx D$esp+030c ;lP
cmp eax &WM_CHAR |jnz L7>>
mov al bl
cmp al 30h |jc L5> |cmp al 3Ah |jc L0>
and al 5fh |cmp al 'X' |jz L4>
cmp al 41h |jc L5> |cmp al 47h |jnc L5>
L0: sub al 30h |cmp al 0ah |db 072 02 |sub al,07 |shl D$INPval 4 |or
B$INPval al |mov b$keyflag+1 al
mov ebx Kname00 |mov eax D$Kindex |mov cl B$KsizeE2 |shl eax cl
|add ebx eax
mov eax D$INPval |mov D$ebx+010 eax
L3: call repaint |cmp D$INPptr 9 |jc L9>>
xor eax eax |mov D$INPptr eax |mov D$INPval eax| jmp L9>>
L4: xor b$keyflag 080h |jmp L9>



Hmmm...
Here's what Jeff Duntemann (author of Assembly Step-by-Step) has to say
about the UCR Standard Library (http://www.duntemann.com/assembly.htm):

"Another of Randy Hyde's projects hosted on his WEBster server. A large
(over 200 routines) library of DOS utility functions in MASM syntax,
which can easily be translated to NASM once you have your NASM wings. I
found the string handling stuff very useful, and it's all beautifully
written and easy to read. People writing comm programs may also
appreciate the serial port code."

So you have a choice, you can write tight code, like the stuff Wolfgang
is pushing (and quick, can you *tell* it's tight code?), or you can
write readable and understandable stuff. And the UCR Standard Library
for 80x86 programmers will help you write far more readable code. As
you're probably a student, whose project scores often depend upon
producing readable code, think about what's more important to you :-)
Cheers,
Randy Hyde

.


Quantcast