BybyLang is a programming language developed by Byby, allowing you to control virtual hardware (APU, BUS, RAM, Pins) or generate Nim code for direct execution. BybyLang supports AOT compilation for fast executable generation.
_BybyLang là một ngôn ngữ lập trình do Byby phát triển, cho phép điều khiển phần cứng ảo hoặc sinh ra mã Nim thực thi trực tiếp. BybyLang hỗ trợ chế độ biên dịch AOT, giúp bạn sinh file thực thi nhanh chóng.
You can find bybylangjit in https://github.com/bobbydeveloper2014/bybylangjit | Bạn có thể tìm bybylangjit ở https://github.com/bobbydeveloper2014/bybylangjit
Hỗ trợ 3 chế độ: Low, Mid, High. Low thao tác phần cứng ảo, High giống Python.
apu tran
, apu mem
, bit send
, mem push
, tran pulse
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
git clone https://github.com/bobbydeveloper2014/bybylang.git
cd bybylang
nim c -r bybylang.nim
./bybylang main.bybylang --aot=output
[--aot=output]
will generate:
output.nim
(Nim code generated from BybyLang)output
(Nim executable built with -d:release
)--ignore-errors
: skip RAM/Pins errors--quiet
: no verbose logmode is 1
# 1: Low, 2: Mid, 3: High
while true:
print "hello"
for i in range(1, 5):
print "hi"
function sayHello
print "Hello, Byby!"
call sayHello
i = 2
if i == 2:
apu tran "core" with "midstep"
elif i == 3:
apu mem write "RAM1" with "99"
else:
print "other"
apu mem write RAM0 with 5
apu mem read RAM0 with 0
apu tran print with "hello world"
tran pulse pin 3 width 2ns
apu pin 5 set high
bit send 101010
bit recv
mem map "RAM0"
mem push "RAM1" with 10
echo "hello world"
print "Hello World"
mode is <level>
at the top of the filefunction
to define functionsapu
, bit
, mem
, tran
) only run in Low mode.bybylang
extensionmain.bybylang
)mode is 1
function sayHello
print "Hello World"
apu mem write RAM0 with 5
apu tran print with "hello world"
tran pulse pin 3 width 2ns
call sayHello
BybyLang giúp bạn khám phá và điều khiển phần cứng ảo trực quan. Hãy thử nghiệm và khám phá sức mạnh của BybyLang!
Pull requests are very welcome! Thank you for visiting the project!