"IBM personal computer assembly language tutorial" - читать интересную книгу автора (Auerbach J.)assembler to bypass a hopelessly inefficient implementation. We don't want
to do this if we can avoid it, but sometimes we can't. Assembly language code can overcome these deficiencies. In some cases, you can also overcome these deficiencies by judicious use of the escape valves which your high level language provides. In BASIC, you can PEEK and POKE and INP and OUT your way around a great many issues. In many other lan- guages you can issue system calls and interrupts and usually manage, one way or other, to modify system memory. Writing handlers to take real-time hardware interrupts from the keyboard or asynch port, though, is still going to be a problem in most languages. Some languages claim to let you do it but I have yet to see an acceptably clean implementation done that way. The real reason while assembler is better than "tricky POKEs" for writing machine-dependent code, though, is the same reason why PASCAL is better than assembler for writing a payroll package: it is easier to maintain. IBM PC Assembly Language Tutorial 2 Let the high level language do what it does best, but recognize that there are some things which are best done in assembler code. The assembler, unlike the tricky POKE, can make judicious use of equates, macros, labels, machine-dependent realm where it thrives. So, there are times when it becomes appropriate to write in assembler; giv- en that, if you are a responsible programmer or manager, you will want to be "assembler-literate" so you can decide when assembler code should be written. What do I mean by "assembler-literate?" I don't just mean understanding the 8086 architecture; I think, even if you don't write much assembler code yourself, you ought to understand the actual process of turning out assem- bler code and the various ways to incorporate it into an application. You ought to be able to tell good assembler code from bad, and appropriate assembler code from inappropriate. Steps to becoming ASSEMBLER-LITERATE ____________________________________ Steps to becoming ASSEMBLER-LITERATE Steps to becoming ASSEMBLER-LITERATE Steps to becoming ASSEMBLER-LITERATE 1. Learn the 8086 architecture and most of the instruction set. Learn what you need to know and ignore what you don't. Reading: The 8086 Primer by Stephen Morse, published by Hayden. You need to read only two chapters, the one on machine organization and the one on the instruction set. |
|
|