100 likes | 342 Views
LMC Assembly. Making Programming Friendlier. Machine Code Issues. Have to remember numeric opcodes Have to think about physical memory locations What if I need to add 6 lines of code to this program?. Assembly. Assembly Code : human readable machine code. Assembly.
E N D
LMC Assembly Making Programming Friendlier
Machine Code Issues • Have to remember numeric opcodes • Have to think about physical memory locations • What if I need to add 6 linesof code to this program?
Assembly • AssemblyCode : human readable machine code
Assembly • Assembly Instructions:
No XX • Assembly can use names for memory locations • Location FIRST instead of 07 • Identify data locations as instructions after program • NAMEDAT Value?
Named Locations • Named locations not affected by adding/removing code Ex: Add EXTRA lines • Assembly fine • Machine version broken
Names And Branch • Any instruction can start with NAME • Use as target of branch: • #1This is called LOOPSTARTWe add one to accumulator • #3Branch to the instructionnamed LOOPSTART
Assembler • An Assembler converts assembly machine code • Compiles it http://www.yorku.ca/sychen/research/LMC/LittleMan.html