diff options
Diffstat (limited to 'qemu/roms/SLOF/board-qemu/slof/helper.fs')
-rw-r--r-- | qemu/roms/SLOF/board-qemu/slof/helper.fs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qemu/roms/SLOF/board-qemu/slof/helper.fs b/qemu/roms/SLOF/board-qemu/slof/helper.fs index 96da49894..40d4abc3a 100644 --- a/qemu/roms/SLOF/board-qemu/slof/helper.fs +++ b/qemu/roms/SLOF/board-qemu/slof/helper.fs @@ -33,3 +33,16 @@ swap - ; +: invert-region-cs ( addr len cellsize -- ) + >r over swap r@ rshift r> swap 1 hv-logical-memop drop +; + +: invert-region ( addr len -- ) + 2dup or 7 and CASE + 0 OF 3 invert-region-cs ENDOF + 4 OF 2 invert-region-cs ENDOF + 3 and + 2 OF 1 invert-region-cs ENDOF + dup OF 0 invert-region-cs ENDOF + ENDCASE +; |