ack/mach/i80/libem
George Koehler c95bcac91d Correct the stack pointer when i80 shrinks an integer.
The code used `sphl` to set the stack pointer, but the correct value
was in de, not hl.  Fix by swapping the values of de and hl, so `sphl`
is now correct.  When we shrink an integer from 4 to 2 bytes, both
registers de and hl point to copies of the result, but only one
register preserves the stack below the result.

This fixes writehex() in tests/plat/lib/test.c, when I compile it with
ack -mcpm, so it preserves the pointer to "0123456789abcdef", so it
writes hexadecimal digits and not garbage.

This bug goes back to commit 157b243 of Mar 18, 1985, so the bug is
32 years old, and probably the oldest bug that I ever fixed.
2017-12-07 15:39:41 -05:00
..
aar2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
adi4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
and.s adapted to new assembler 1987-01-28 18:57:04 +00:00
blm.s adapted to new assembler 1987-01-28 18:57:04 +00:00
build.lua Biggish refactor to break cycles; my build rules were full of them. cpm builds, 2016-08-14 01:39:40 +02:00
cii.s Correct the stack pointer when i80 shrinks an integer. 2017-12-07 15:39:41 -05:00
cmi4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
cms.s adapted to new assembler 1987-01-28 18:57:04 +00:00
com.s adapted to new assembler 1987-01-28 18:57:04 +00:00
csa.s adapted to new assembler 1987-01-28 18:57:04 +00:00
csb.s adapted to new assembler 1987-01-28 18:57:04 +00:00
dup.s adapted to new assembler 1987-01-28 18:57:04 +00:00
dvi2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
dvi4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
exg.s adapted to new assembler 1987-01-28 18:57:04 +00:00
flp.s adapted to new assembler 1987-01-28 18:57:04 +00:00
inn.s adapted to new assembler 1987-01-28 18:57:04 +00:00
ior.s adapted to new assembler 1987-01-28 18:57:04 +00:00
lar2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
LIST archive name change: tail --> libem_s.a 1987-01-28 15:23:22 +00:00
loi.s adapted to new assembler 1987-01-28 18:57:04 +00:00
mli2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
mli4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
mlu2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
ngi4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
nop.s adapted to new assembler 1987-01-28 18:57:04 +00:00
rck.s more corrections 1987-01-28 22:54:52 +00:00
rol4.s more corrections 1987-01-28 22:54:52 +00:00
ror4.s more corrections 1987-01-28 22:54:52 +00:00
sar2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sbi4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
set.s adapted to new assembler 1987-01-28 18:57:04 +00:00
set2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sli2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sli4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sri2.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sri4.s adapted to new assembler 1987-01-28 18:57:04 +00:00
sti.s adapted to new assembler 1987-01-28 18:57:04 +00:00
xor.s adapted to new assembler 1987-01-28 18:57:04 +00:00