h a l f b a k e r yOK, we're here. Now what?
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
browse anonymously,
or get an account
and write.
register,
|
|
|
By using macros to substitute descriptive names for register names, an assembler could determine when each named value was needed and when it could be discarded to allow another named value to be stored there.
This would allow assemblers to optimize register allocations, and perhaps other aspects
of the code. The programmer would use the macros to tell the assembler his preferred registers for each value, with the expectation that the assembler might have a better choice after its analysis of the code. He would also have an easier time of keeping track of the values he's working with. Something like this:
NormalBakingTime TEXTEQU <40>
BakingTime TEXTEQU <ecx>
mov BakingTime, NormalBakingTime ; Load normal baking time
shr BakingTime, 1 ; Divide baking time in half
Edit: Fixed sample code.
[link]
|
|
Baked. The assembler for the DEC LSI-11 bitslice CPU can do this. |
|
|
Probably not WKTE any more though, as the number of programmers who remember LSI-11s diminishes year by year ... |
|
|
Old programmers never forget - they just decompile ... |
|
| |