Changeset 2063 for src/ASM/CPP2012-asm
- Timestamp:
- Jun 13, 2012, 5:05:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ASM/CPP2012-asm/cpp-2012-asm.tex
r2061 r2063 74 74 75 75 The MCS-51 has a relative paucity of features compared to its more modern brethren, with the lack of any caching or pipelining features means that timing of execution is predictable, making the MCS-51 very attractive for CerCo's ends. 76 Yet, as in most things, what one hand giveth the other taketh away, and the MCS-51's paucity of features---though an advantage in many respects---also quickly become a hindrance.76 Yet, as in most things, what one hand giveth the other taketh away, and the MCS-51's paucity of features---though an advantage in many respects---also quickly becomes a hindrance. 77 77 In particular, the MCS-51 features a relatively minuscule series of memory spaces by modern standards. 78 78 As a result our C compiler, to have any sort of hope of successfully compiling realistic programs for embedded devices, ought to produce `tight' machine code. … … 149 149 However, to shrink the \texttt{LJMP} occurring at line 3 we must also shrink the \texttt{LJMP} occurring at line 5, and \emph{vice versa}. 150 150 151 Further, consider what happens if, instead of appearing at memory address \texttt{0x100}, the instruction at line 5 insteadappeared \emph{just} beyond the size of code memory, and all other memory addresses were shifted accordingly.151 Further, consider what happens if, instead of appearing at memory address \texttt{0x100}, the instruction at line 5 appeared \emph{just} beyond the size of code memory, and all other memory addresses were shifted accordingly. 152 152 Now, in order to be able to successfully fit our program into the MCS-51's limited code memory, we are \emph{obliged} to shrink the \texttt{LJMP} occurring at line 5. 153 153 That is, the shrinking process is not just related to the optimisation of generated machine code but also the completeness of the assembler itself. … … 426 426 Next, we are able to translate \texttt{PseudoStatus} records into \texttt{Status} records using \texttt{status\_of\_pseudo\_status}. 427 427 Translating a \texttt{PseudoStatus}'s code memory requires we expand pseudoinstructions and then assemble to obtain a trie of bytes. 428 This never fails, provid ingthat our policy is correct:428 This never fails, provided that our policy is correct: 429 429 \begin{lstlisting} 430 430 definition status_of_pseudo_status:
Note: See TracChangeset
for help on using the changeset viewer.