test: fix _embdemo

This commit is contained in:
Haolan
2025-09-02 20:06:48 +08:00
parent 5a4c83ef85
commit 1bd9ceb444
5 changed files with 41 additions and 15 deletions

View File

@@ -0,0 +1,16 @@
package main
import "github.com/goplus/lib/c"
func myprint(s *c.Char) {
for i := 0; i < int(c.Strlen(s)); i++ {
WriteByte(byte(c.Index(s, i)))
}
}
func main() {
for {
myprint(c.Str("hello world"))
sleep(1)
}
}