Re: Question about jumps
- From: Markus Pitha <ngNOSPAM@xxxxxxxxxx>
- Date: Sun, 27 Aug 2006 23:59:56 +0200
rhyde wrote:
Do you plan on stopping before getting very far?
No, not at all.
I'm assuming you already know how to use an IF statement. That means
when you see an IF statement in HLA, you're going to need very little
explanation as to how to use it in a program. Therefore, you can
concentrate on the *important* things, like what a MOV instruction does
and how to use ADD, AND, SUB, and so on, without being distracted with
issues like how flags are set by each of these instructions.
I know exactly what you mean but otherwise I think it's good to
understand how the flags work with the jump commands together,
e.g. important for branching.
The problem I'm seeing in your posts, though, is *typical* of students
trying to cover too much material at once. While I certainly encourage
you to learn as much as you can from as many sources as possible, it's
pretty clear that you're suffering from the "information overload"
problem (too many new ideas coming at you from too many directions)
That's right, but I think the best way (for me) to learn a programming
language is "learning by doing" and reading the complementary information
additionally or new information first and making the tryings afterwards.
that led me to develop the pedagogy (teaching method) I used in AoA/32.
If you didn't realize this, I taught assembly language using MASM (see
AoA/16) for *many* years before I even dreamed up the concept of HLA and
the pedagogy I use in AoA/32. I constantly saw in my students the same
thing I'm seeing with you -- the need to understand too many concepts
all at once in order to get through a particular unit early on in the
course.
Maybe in my case it's not that heavy. You are surely right that one needs
to know many concepts at once, and I'm sure you know what you're
talking about due to your teaching experience, but I have already some
electronic knowledge due to my first education, I know C and Perl and now
while my second education in an other technical school, I visit almost
every day in the evening, I have to learn Java and C#, so it shouldn't be
a real problem for me to learn everything together instead of step by
step. And that's what worked for me pretty well every time. In doing so I
make notes of important things on paper to have this important information
every time at hand as long as I don't know it by heart.
But by the time you finish the book, you'll know *far* more assembly
language than if you'd taken another approach.
But if I learn almost everything in HLA style, I don't think I will be
able to decipher something like that that easily (Ok I didn't browse to
your whole book yet, so my opinion is more subjective than objective):
push cx
push dx
shl ax,4
mov cx,ax ;cycle 16 bits [randomness] times
get_true_rnd_loop:
mov al,06h ;latch counter 0 for word read
cli
out 43h,al ;post request to timer control port
jmp $+2 ;IO delay (JMP to next instruction)
in al,40h ;read LSB of timer count
xor dl,al ;XOR-on LSB
jmp $+2 ;IO delay (JMP to next instruction)
in al,40h ;read MSB of timer count
sti
xor dl,al ;XOR-on MSB
rol dx,1 ;scroll rnd # for uniform randomness
dec cx
jnz short get_true_rnd_loop ;DEC CX+JNZ is usually faster than LOOP
mov ax,dx ;return ax: true random number
pop dx
pop cx
ret
(I found that "random number generator" on the net, but it doesn't work
yet due to an out of memory error. Maybe I'll find the error out soon)
Regards,
Markus
.
- Follow-Ups:
- Re: Question about jumps
- From: randyhyde@xxxxxxxxxxxxx
- Re: Question about jumps
- References:
- Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- From: rhyde
- Re: Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- From: rhyde
- Question about jumps
- Prev by Date: explanation of an assembly code
- Next by Date: Re: Question about jumps
- Previous by thread: Re: Question about jumps
- Next by thread: Re: Question about jumps
- Index(es):
Relevant Pages
|