mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-22 00:17:03 +00:00
8080: Faster strlen; more multiplication optimizations
This commit is contained in:
+14
-1
@@ -1,4 +1,16 @@
|
||||
|
||||
#if ARCH_I80
|
||||
|
||||
byte strzlen(pointer str) {
|
||||
pointer end
|
||||
end = str
|
||||
while end[0] != 0 {
|
||||
end += 1
|
||||
}
|
||||
return lo(end - str)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
byte strzlen(pointer str) {
|
||||
byte index
|
||||
@@ -7,4 +19,5 @@ byte strzlen(pointer str) {
|
||||
index += 1
|
||||
}
|
||||
return index
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user