mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Passed tests of bitscan-reverse
This commit is contained in:
parent
4f0380dafa
commit
1473176c3e
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ create msb-table
|
||||||
\ If u == 0, returns -1
|
\ If u == 0, returns -1
|
||||||
: bitscan-reverse ( u -- u )
|
: bitscan-reverse ( u -- u )
|
||||||
dup 0xff u< if cells msb-table + @ exit then
|
dup 0xff u< if cells msb-table + @ exit then
|
||||||
|
8 rshift recurse 8 +
|
||||||
; export
|
; export
|
||||||
|
|
||||||
}private
|
}private
|
||||||
|
|
Loading…
Reference in a new issue