flat assembler
Message board for the users of flat assembler.
Index
> Main > Three Questions confused me, Could you help? |
Author |
|
fasm9 13 Aug 2004, 02:23
I don't know well computer due to my lazyness("Being happy for doing nothing")
But, you should check this! http://www.homebrewcpu.com Everything is his *own*. not their. -- PS: if you seek some books, here is my recommendation. http://board.flatassembler.net/topic.php?t=1422&p=10428 |
|||
13 Aug 2004, 02:23 |
|
Madis731 13 Aug 2004, 08:13
1. When hard-coding ops you will definately need a pencil and a paper but
nowdays compilers are so advanced(FASM ) that you don't need much brainwork to achieve something that macros can do for you. If you mean the jump distance calculation, then it's very tedious job, because any change in code changes the distance between the jump and the destination. 2.Short answer:You don't! Long answer:You will eventually make up a loop-up table in your head and you won't have to think if you stumble upon FF or A0 which are 255 and 160 respectively. Some hints though: Its hard to think of (A+F)h as a 10+15, because 25 does not make sence: 10h=16,20h=32 so 25 is 10h+(25-16) or 19h, waste of time - think of F as 9 in base ten. 5+9=14 <= you subtract 1 from 5, don't you. (A+F)h=19h you subtract 1 from Ah which is 9, simple and (13-E)h=(13-10+2)h=5 due to fact that 10h-Eh=2h (A*D)h is hard to do it in your head. 10*13=130 <=nearest 2^n=128 so you would think what is 128 in HEX : 80h and 130-128=2 so you get 82h 3.Learning electronics is not obligatory but it helps A LOT. If you ever get frustrated over why graphics take long or MUL more cycles that ADD then it doesn't hurt to give the 'source' a look: dig into the very gates themselves and try to walk through the gates in your head with all kinds of inputs and soon you will wonder why isn't it the other way around, because ADD carries should take 32 clocks you will find some very interesting stuff. For example for your brain it will take a long time to figure out the use of EIP. You think YOU can deal without it, but for a computer its crucial Hope it helps, with any questions, please return. |
|||
13 Aug 2004, 08:13 |
|
vid 13 Aug 2004, 11:47
1. Method i use is having "blocks" of code, linear ordered, each block starts with comment, that says where this blocks continues (usually at following block, no comment then). If blocks jumps elsewhere (conditonaly or not), it is written in comment. Whis is main difference from HLLs like C or pascal. But you will learn it best by usage.
2. remember learning computing over 10 in first class, like 5+7? You have to learn same thing in hex. But in reality nobody does this, you can live without it, and when you will need it, you will learn it quickly by usage, again. 3. Absolutely not nescessary, but again, people who code assembly are usually interested how things work, so they will get to this point. |
|||
13 Aug 2004, 11:47 |
|
tom tobias 14 Aug 2004, 07:32
control of flow: it is easy to get lost with so many different methods of controlling program execution available to the Intel cpu architecture. For a debutant, at least, (and in my opinion, for Masters of Assembly as well,) it is EASIER for someone else to understand your program, if you will rely upon ONLY two or three methods of evaluating conditions to determine subsequent program execution. Intel's RICH instruction set permits many, many different routes, to accomplish similar goals, but the more of them you employ in your program, the more difficult it will be for another person to understand what you are trying to accomplish. SIMPLICITY of design, with concomitant program readability (at the cost of increased memory use and increased program execution time) trump ALL OTHER FACTORS.
learning electronics: not necessary, because you will not be measuring analogue currents, nor applying resistors, diodes, or capacitors. WHAT IS ESSENTIAL to learn, for Assembly language, or any other computer programming environment is Boolean Algebra. Hexadecimal notation is convenient to understand, because much of the original literature used it, but it is not essential. regards, tom |
|||
14 Aug 2004, 07:32 |
|
vid 20 Aug 2004, 20:10
Quote: It's said that assembly programmers (coders) always have pencil and paper handy when they programming, and draw all the "jump flows" on the paper to see which part is which. don't believe everything you see. Many people can code without this, especially on smaller projects. Also on bigger projects with good coders, this is only needed for uppermost part of program in hierachy, when dividing work to people. This is "mathematical" way to express algorithms, instead of using some programming languages, you are using symbols (boxes, diamonds, arrows etc.). But you can construct something like that easier in your mind, and if problem is hard and thus interesting, you will probably remember solution so you don't have to memorize it. |
|||
20 Aug 2004, 20:10 |
|
lilainst 24 Aug 2004, 08:16
Thanks for ALL of your great advice. I'll try my best to become a coder... and I hope that's not too late. I shuffled a lot in HLLs and did waste a lot of time. I'm now adhere to Assembly and Fasm, and hope that I made a wise decision this time.
Thank you again. Best Regards |
|||
24 Aug 2004, 08:16 |
|
fasm9 24 Aug 2004, 09:04
Believe me, Learning assembly never let you down!
Assembly most close to "what is what". -- |
|||
24 Aug 2004, 09:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.