mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
CLI apps transfer to Userspace
This commit is contained in:
30
src/kernel/userland/sweden.c
Normal file
30
src/kernel/userland/sweden.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <stdlib.h>
|
||||
#include <syscall.h>
|
||||
|
||||
static void beep(int freq, int ms) {
|
||||
sys_system(14, freq, ms, 0, 0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argc; (void)argv;
|
||||
printf("Playing Sweden - C418 (Minecraft)...\n");
|
||||
|
||||
// Main melody (simplified pattern)
|
||||
beep(392, 400); // G4
|
||||
beep(440, 400); // A4
|
||||
beep(493, 800); // B4
|
||||
|
||||
beep(440, 400); // A4
|
||||
beep(392, 800); // G4
|
||||
beep(329, 800); // E4
|
||||
|
||||
beep(392, 400); // G4
|
||||
beep(440, 400); // A4
|
||||
beep(493, 800); // B4
|
||||
|
||||
beep(440, 400); // A4
|
||||
beep(392, 1200); // G4
|
||||
|
||||
printf("Done.\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user