بنقرة واحدة
add-builtin
Add a new shell built-in command to BDOS. Use when asked to add a shell command, built-in, or CLI command.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Add a new shell built-in command to BDOS. Use when asked to add a shell command, built-in, or CLI command.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Debug hardware issues on FPGC: SPI devices, DMA transfers, SD card, Ethernet, USB. Use when asked to debug a hardware problem, add debug output, or diagnose a peripheral issue.
Add a new syscall to BDOS and expose it to userland programs. Use when asked to add a system call, kernel API, or new OS functionality accessible from user programs.
Update documentation after making code or hardware changes. Use when asked to update docs, write documentation, or after completing a feature that needs documenting.
Create a new userBDOS program (user-space application for BDOS). Use when asked to write a new program, app, tool, or utility for the FPGC.
| name | add-builtin |
| description | Add a new shell built-in command to BDOS. Use when asked to add a shell command, built-in, or CLI command. |
The shell is a userBDOS program at Software/C/userBDOS/sh.c.
Built-in commands are implemented directly in sh.c.
Edit Software/C/userBDOS/sh.c.
Add an implementation function following the existing pattern:
static int bi_YOURCOMMAND(int argc, char **argv)
{
// argc includes the command name itself
// argv[0] is the command name
if (argc < 2) {
print_str("Usage: YOURCOMMAND <arg>\n");
return 1;
}
// Implementation here
return 0; // 0 = success
}
Find the builtin dispatch section in sh.c and add your command.
The registration mechanism is a string comparison chain — add yours
following the existing pattern.
Find the help command implementation in sh.c and add a line
describing your new command.
make compile-userbdos file=sh
sh.cmake compile-userbdos file=sh passesFor commands that should be standalone programs (pipe-compatible,
usable outside the shell), create a new userBDOS program in
Software/C/userBDOS/ instead. See existing programs like ls.c,
cat.c, grep.c for examples. External programs are preferred
over builtins for most new commands.