Re: Question about jumps



rhyde@xxxxxxxxxx wrote:

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.

Are you sure?

#macro uToEnglish( unsVal, NumberCase );
#if( unsVal >= 20 )
#if( unsVal mod 10 <> 0 )
#if( NumberCase )
Tens[unsVal div 10] + "-" + @lowercase( Ones[unsVal mod 10], 0)

If unsVal=-1 or unsVal=0xffffffff is then ( unsVal >= 20 ) true or false?
What is (unsVal mod n) for n<0
If unsVal=-1 or unsVal=0xffffffff what is then [unsVal div 10]

Nothing is clear with your HL statements. If you had used CPU instructions
(div/idiv branch-higher-same / branch-greater-equal) everything would
be clear.

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.

Why do you need an IF (or a conditional branch) to explain and use
MOV, ADD, AND, SUB instructions?

Later on,
once you're comfortable with the simplified set of instructions, you
can learn about condition codes (flags). Then you can learn about
conditional jump instructions.

Yes, but until this time you also need no IF or other HL statement.


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 led me to develop the pedagogy (teaching method) I used in AoA/32.

As I see it, the most beginner problems are not problems with
the CPU instructions but with the programming tools (to set the
correct path and use the proper options) and the assembler
directives (which has nothing to do CPU instructions). And all
these problems could easily be avoided by using an assembler
which is a single program which reads the source file and directly
writes the executable and listing. For learning assembly programming
you neither need macros nor include files nor linking to libraries.
.



Relevant Pages

  • Re: Evolution
    ... > inline assembler and larger parts by linking to an assembler ... in the HLL. ... language, particularly in smaller projects. ... > or two instructions if you ...
    (alt.lang.asm)
  • Re: What do I do with Art Of Assembly?
    ... >> and spit it out into an EXE file then, with ASM coding, it's ... > whether HLA is an assembler or not. ... instructions" such as macros, section declarations, MASM's "HLLisms" ... forms of "JMP" as 4 of the encodings may take a size prefix to select ...
    (alt.lang.asm)
  • Re: Id like to learn asm...
    ... While we're at it, remove all the system instructions, ... instructions" is a miserable way to learn assembly language ... IF segment selector is NULL ... assembler code. ...
    (alt.lang.asm)
  • Re: Two Click disassembly/reassembly
    ... Map the extra x86 registers to memory. ... > equivalents to the string instructions. ... > got such a limited RISC like instruction set that the assembler is more ...
    (alt.lang.asm)
  • Re: Trivia Question
    ... This is what I meant by "ignorance". ... people's *existing* HLL knowledge to learn assembly language programming? ... Which I had such an assembler when starting with Delphi. ... After working with the needed instructions some times, repleatly, they tend to stick around in your memory. ...
    (alt.lang.asm)