duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit 0cf6393ef4a4e6a363952f21836a31749f3aefff
parent 0cc438e9cf2cbf2c2006ee905c5b1e1fb9f54b55
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Sun,  2 Jul 2023 17:38:12 -0400

hal i386: fix <<, with <>) and 16b)

Diffstat:
Mfs/tests/hal.fs | 7+++++++
Mfs/xcomp/i386/kernel.fs | 4++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/fs/tests/hal.fs b/fs/tests/hal.fs @@ -301,4 +301,11 @@ code test33 ( a -- [a+$100] ) W) $100 +) 8b) @, exit, foo test33 42 #eq + +\ <<, <>) and 16b) +create foo 42 16b , 54 16b , +code test34 ( n -- ) + foo m) <>) 16b) <<, drop, exit, + +4 test34 foo 16b @ $2a0 #eq foo 2 + 16b @ 54 #eq testend diff --git a/fs/xcomp/i386/kernel.fs b/fs/xcomp/i386/kernel.fs @@ -482,8 +482,8 @@ pc to L1 ( operand -- ) \ dx=SHL/SHR regid ax HALINV i) test, forward8 jz, \ inverted, dst is going to CX xdup, 3 cx al modrm!, dx push, wcall, !, dx pop, \ mov cx, dst - 0 al reg!, al dl or, - $d3 i) cwrite, lblmodrmwr absjmp, forward! + ax HALINV ^ i) and, 0 al reg!, al dl or, + ax $d300 i) or, lblregularwr absjmp, forward! xdup, cx al reg!, \ target CX dx push, wcall, @, dx pop, \ mod becomes 3, reg moves to rm and DL is orred into modrm