| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Original HTTPS Page] |
Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.
You must be logged in to block users.
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abuseCode is a game, every line is a discovery!
Lập trình như một trò chơi, mỗi dòng là một khám phá!
BybyLang là ngôn ngữ lập trình mình tự phát triển, có 4 chế độ hoạt động:
| Chế độ/Mode | Mức/Level | Mô tả/Description |
|---|---|---|
| mode 1 | Cấp thấp/Low | Làm việc trực tiếp với chip, transistor, Bbit. Directly with chip, transistor, Bbit. |
| mode 2 | Cấp trung/Mid | Viết code giống C nhưng cú pháp Byby. Code like C, but Byby syntax. |
| mode 3 | Cấp cao/High | Như Python/Objective-C, không dùng (). Like Python/Obj-C, no parentheses. |
| mode 4 | Cấp web/Web | Cho Byby UI Web, cú pháp cực ngắn. Byby UI Web, super short syntax. |
Gán giá trị | Assign value:
a is 5
Định nghĩa hàm | Define function:
function say and name
print "Hello" and name
Gọi hàm | Call function:
say and "Byby"
Import module:
import "website.byby"
Không dùng (), {}, ;, hay dấu =.
Chữ and bắt buộc khi khai báo hàm.
BybyLang cho phép gửi lệnh trực tiếp tới phần cứng với các từ khoá đặc biệt: apu, bit, tran, mem...
| Lệnh/Command | Mô tả/Description | Ví dụ/Example |
|---|---|---|
| apu tran | Gọi transistor thực, thực hiện thao tác phần cứng | apu tran "print" with "hello world" |
| apu mem | Ghi dữ liệu vào transistor memory | apu mem write "RAM0" with 5 |
| apu read | Đọc giá trị từ transistor hoặc thanh ghi | apu read "reg1" |
| apu pin | Điều khiển pin vật lý | apu pin 3 set high |
| apu call | Gọi hàm ở cấp chip (firmware) | apu call "GPU.flush" |
| bit send | Gửi tín hiệu dạng Bbit | bit send "10101101" |
| bit recv | Nhận tín hiệu từ mạch | bit recv |
| mem map | Ánh xạ vùng nhớ | mem map "GPU.buffer" |
| mem push | Đưa dữ liệu vào vùng nhớ | mem push "GPU.buffer" with imageData |
| tran sync | Đồng bộ hóa transistor | tran sync all |
| tran pulse | Phát xung transistor | tran pulse pin 3 width 5ns |
| apu core | Chạy code trực tiếp trên lõi chip | apu core 1 run "matrix.mul" |
| apu gpu | Gửi lệnh trực tiếp đến GPU | apu gpu draw "triangle" |
| apu ai | Kích hoạt AI module | apu ai run "text-process" |
| apu bus | Điều khiển bus truyền dữ liệu | apu bus transfer from "CPU" to "GPU" |
1️⃣ Cấp thấp (mode 1):
mode is 1
apu tran "print" with "hello world"
apu mem write "ram0" with 123
apu pin 3 set high
tran pulse pin 3 width 2ns
Đây là lệnh gửi trực tiếp xuống tầng transistor, không phải mô phỏng!
2️⃣ Cấp trung (mode 2):
mode is 2
function start and message
apu tran "print" with message
apu core 1 run "gpu.load"
3️⃣ Cấp cao (mode 3):
mode is 3
function say and name
print "hello" and name
4️⃣ Cấp web (mode 4):
mode is 4
component hello
text "hello web"
Thanks for visiting my hub!
Cảm ơn bạn đã ghé thăm! Nếu bạn cũng đam mê lập trình, hãy kết nối với mình!
This is a library to make a game 3d on ios or macos with uikit (macos with mac catalyst)
Objective-C 1
| Back | FazBrowse Home | New Git URL |