[ Pobierz całość w formacie PDF ]

could be converted into one of 8 machine instructions, depending on the exact form of the address
field. What differences would it make to the assembly process if you had to cater for such
conventions? To make it realistic, study the 6502 assembler mnemonics in detail.
7.23 Another variation on address field notation was provided by the Intel 8080 assembler, which
used mnemonics like
MOV A, B and MOV B, A
to generate different single byte instructions. How would this affect the assembly process?
7.24 Some assemblers allow the programmer the facility to use "local" labels, which are not really
part of a global symbol list. For example, that provided with the UCSD p-System allowed code like
LAB MVI A, 4
JMP $2
MVI B, C
$2 NOP
LHLD 1234
LAB2 XCHG
POP H
$2 POP B
POP D
JMP $2
LAB3 NOP
Here the $2 label between the LAB1 and LAB2 labels and the $2 label between the LAB2 and LAB3
labels are local to those demarcated sections of code. How difficult is it to add this sort of facility to
an assembler, and what would be the advantages in having it?
7.25 Develop a one-pass or two-pass macro assembler for the stack-oriented machine discussed in
Chapter 4.
7.26 As a more ambitious project, examine the assembler language for a real microprocessor, and
write a good macro assembler for it. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • antman.opx.pl
  • img
    \