├── .gitignore ├── GPL ├── LICENSE ├── Makefile ├── README.md ├── README ├── ABOUT ├── BUGS ├── COMPILING ├── MAKE_INITRD ├── TODO └── USB-BOOT ├── core ├── arch │ ├── boot.asm │ ├── common.c │ ├── cpu.c │ ├── descriptor_tables.c │ ├── gdt.asm │ ├── interrupt.asm │ ├── isr.c │ ├── kheap.c │ ├── paging.c │ ├── process.asm │ ├── task.c │ ├── timer.c │ └── v86.asm ├── crypt.c ├── elf.c ├── ext2_fs.c ├── gui │ ├── graphics.c │ └── x_server.c ├── initrd.c ├── k_programs.c ├── k_shell.c ├── k_stdio.c ├── keyboard.c ├── main.c ├── math │ └── k_math.c ├── mouse.c ├── ordered_array.c ├── schedule.c ├── sound.c ├── std_fs.c ├── syscall.c └── vfs.c ├── debug.sh ├── docs ├── ELF_Format.pdf ├── FloppyControllerDatasheet.pdf ├── ext2.pdf ├── ext2_disklayout.pdf ├── floppy.pdf └── practical-file-system-design.pdf ├── drivers ├── floppy │ └── fdc.c └── video │ └── vesa.c ├── floppy.img ├── grub-boot └── boot │ └── grub │ ├── 915resolution.mod │ ├── acpi.mod │ ├── adler32.mod │ ├── affs.mod │ ├── afs.mod │ ├── afs_be.mod │ ├── aout.mod │ ├── at_keyboard.mod │ ├── ata.mod │ ├── ata_pthru.mod │ ├── befs.mod │ ├── befs_be.mod │ ├── biosdisk.mod │ ├── bitmap.mod │ ├── bitmap_scale.mod │ ├── blocklist.mod │ ├── boot.img │ ├── boot.mod │ ├── bsd.mod │ ├── btrfs.mod │ ├── bufio.mod │ ├── cat.mod │ ├── cdboot.img │ ├── chain.mod │ ├── cmostest.mod │ ├── cmp.mod │ ├── command.lst │ ├── configfile.mod │ ├── core.img │ ├── cpio.mod │ ├── cpuid.mod │ ├── crypto.lst │ ├── crypto.mod │ ├── cs5536.mod │ ├── date.mod │ ├── datehook.mod │ ├── datetime.mod │ ├── diskboot.img │ ├── dm_nv.mod │ ├── drivemap.mod │ ├── echo.mod │ ├── efiemu.mod │ ├── efiemu32.o │ ├── efiemu64.o │ ├── elf.mod │ ├── example_functional_test.mod │ ├── ext2.mod │ ├── extcmd.mod │ ├── fat.mod │ ├── font.mod │ ├── fs.lst │ ├── fshelp.mod │ ├── functional_test.mod │ ├── g2hdr.img │ ├── gcry_arcfour.mod │ ├── gcry_blowfish.mod │ ├── gcry_camellia.mod │ ├── gcry_cast5.mod │ ├── gcry_crc.mod │ ├── gcry_des.mod │ ├── gcry_md4.mod │ ├── gcry_md5.mod │ ├── gcry_rfc2268.mod │ ├── gcry_rijndael.mod │ ├── gcry_rmd160.mod │ ├── gcry_seed.mod │ ├── gcry_serpent.mod │ ├── gcry_sha1.mod │ ├── gcry_sha256.mod │ ├── gcry_sha512.mod │ ├── gcry_tiger.mod │ ├── gcry_twofish.mod │ ├── gcry_whirlpool.mod │ ├── gettext.mod │ ├── gfxmenu.mod │ ├── gfxterm.mod │ ├── gptsync.mod │ ├── grldr.img │ ├── grub.cfg │ ├── grubenv │ ├── gzio.mod │ ├── halt.mod │ ├── hashsum.mod │ ├── hdparm.mod │ ├── hello.mod │ ├── help.mod │ ├── hexdump.mod │ ├── hfs.mod │ ├── hfsplus.mod │ ├── hwmatch.mod │ ├── iorw.mod │ ├── iso9660.mod │ ├── jfs.mod │ ├── jpeg.mod │ ├── kernel.img │ ├── keylayouts.mod │ ├── keystatus.mod │ ├── legacycfg.mod │ ├── linux.mod │ ├── linux16.mod │ ├── lnxboot.img │ ├── loadenv.mod │ ├── locale │ ├── en_AU.mo │ ├── en_CA.mo │ └── en_GB.mo │ ├── loopback.mod │ ├── ls.mod │ ├── lsacpi.mod │ ├── lsapm.mod │ ├── lsmmap.mod │ ├── lspci.mod │ ├── lvm.mod │ ├── lzopio.mod │ ├── mdraid09.mod │ ├── mdraid1x.mod │ ├── memdisk.mod │ ├── memrw.mod │ ├── minicmd.mod │ ├── minix.mod │ ├── minix2.mod │ ├── mmap.mod │ ├── moddep.lst │ ├── msdospart.mod │ ├── multiboot.mod │ ├── multiboot2.mod │ ├── nilfs2.mod │ ├── normal.mod │ ├── ntfs.mod │ ├── ntfscomp.mod │ ├── ntldr.mod │ ├── ohci.mod │ ├── part_acorn.mod │ ├── part_amiga.mod │ ├── part_apple.mod │ ├── part_bsd.mod │ ├── part_gpt.mod │ ├── part_msdos.mod │ ├── part_sun.mod │ ├── part_sunpc.mod │ ├── partmap.lst │ ├── parttool.lst │ ├── parttool.mod │ ├── password.mod │ ├── password_pbkdf2.mod │ ├── pbkdf2.mod │ ├── pci.mod │ ├── play.mod │ ├── png.mod │ ├── probe.mod │ ├── pxe.mod │ ├── pxeboot.img │ ├── pxecmd.mod │ ├── raid.mod │ ├── raid5rec.mod │ ├── raid6rec.mod │ ├── read.mod │ ├── reboot.mod │ ├── regexp.mod │ ├── reiserfs.mod │ ├── relocator.mod │ ├── scsi.mod │ ├── search.mod │ ├── search_fs_file.mod │ ├── search_fs_uuid.mod │ ├── search_label.mod │ ├── sendkey.mod │ ├── serial.mod │ ├── setjmp.mod │ ├── setpci.mod │ ├── sfs.mod │ ├── sleep.mod │ ├── squash4.mod │ ├── tar.mod │ ├── terminal.lst │ ├── terminal.mod │ ├── terminfo.mod │ ├── test.mod │ ├── test_blockarg.mod │ ├── testload.mod │ ├── tga.mod │ ├── trig.mod │ ├── true.mod │ ├── udf.mod │ ├── ufs1.mod │ ├── ufs2.mod │ ├── uhci.mod │ ├── usb.mod │ ├── usb_keyboard.mod │ ├── usbms.mod │ ├── usbserial_common.mod │ ├── usbserial_ftdi.mod │ ├── usbserial_pl2303.mod │ ├── usbtest.mod │ ├── vbe.mod │ ├── vga.mod │ ├── vga_text.mod │ ├── video.lst │ ├── video.mod │ ├── video_bochs.mod │ ├── video_cirrus.mod │ ├── video_fb.mod │ ├── videoinfo.mod │ ├── videotest.mod │ ├── xfs.mod │ ├── xnu.mod │ ├── xnu_uuid.mod │ ├── xzio.mod │ ├── zfs.mod │ └── zfsinfo.mod ├── include ├── arch │ ├── common.h │ ├── cpu.h │ ├── descriptor_tables.h │ ├── isr.h │ ├── kheap.h │ ├── paging.h │ ├── task.h │ └── timer.h ├── crypt.h ├── drivers │ ├── fdc.h │ └── vesa.h ├── elf.h ├── ext2_fs.h ├── gui │ ├── graphics.h │ └── x_server.h ├── initrd.h ├── k_programs.h ├── k_shell.h ├── k_stdio.h ├── keyboard.h ├── math │ └── k_math.h ├── mouse.h ├── multiboot.h ├── ordered_array.h ├── schedule.h ├── sound.h ├── std_fs.h ├── syscall.h ├── system.h ├── system │ └── version.h └── vfs.h ├── initrd ├── dynamic ├── elf_test ├── elf_test.c ├── initrd.img ├── make_initrd ├── make_initrd.c ├── test.txt ├── test2.txt ├── test_long ├── test_s └── testbin ├── kernel ├── kernel.sym ├── link.ld ├── object_files ├── c │ ├── common.o │ ├── cpu.o │ ├── crypt.o │ ├── descriptor_tables.o │ ├── elf.o │ ├── ext2_fs.o │ ├── fdc.o │ ├── graphics.o │ ├── initrd.o │ ├── isr.o │ ├── k_math.o │ ├── k_programs.o │ ├── k_shell.o │ ├── k_stdio.o │ ├── keyboard.o │ ├── kheap.o │ ├── main.o │ ├── mouse.o │ ├── ordered_array.o │ ├── paging.o │ ├── schedule.o │ ├── sound.o │ ├── std_fs.o │ ├── syscall.o │ ├── task.o │ ├── timer.o │ ├── vesa.o │ ├── vfs.o │ └── x_server.o └── nasm │ ├── boot.o │ ├── gdt.o │ ├── interrupt.o │ ├── process.o │ └── v86.o ├── run.sh ├── screenshots ├── command_list.png ├── filesystem_in_action.png ├── pong.png ├── start_up.png ├── tinytext.png └── window_manager.png ├── storage.img ├── update_image.sh └── usb_make.sh /.gitignore: -------------------------------------------------------------------------------- 1 | #any temporary files that libre office has 2 | .~lock.* 3 | 4 | #custom scripts for my IDE 5 | my_* 6 | 7 | #ignore backup files created by my IDE 8 | \#*\# 9 | .#* 10 | *emacs* 11 | *~ 12 | TAGS -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 JS-OS. All rights reserved. 2 | 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | MA 02110-1301, USA. 18 | 19 | Any use of this code or any file that came with this distribution, must comply to the GPL license and JS-OS must be credited. 20 | 21 | Redistributions of source code or any other file that came with this distribution, must retain the above copyright notice and abide by the following disclaimer. 22 | 23 | Redistributions in binary form must reproduce the above copyright notice, abide by the following disclaimer and/or other notice provided with the distribution. 24 | 25 | Disclaimer: 26 | Neither the name of the JS-OS nor the names of its contributors may be used to endorse 27 | or promote unauthorized products derived from this software without specific prior written permission. Any file/disclaimer in any version release of JS-OS will confide to the LICENCE found in the newest released version of JS-OS, unless otherwise specifically specified. 28 | 29 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 30 | 31 | JS-OS nor any of its contributors/developers own the rights to any of the files in JS-OS/docs/ unless otherwise specified. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JS-OS 2 | ===== 3 | 4 | ![Alt text](./screenshots/start_up.png) 5 | ![Alt text](./screenshots/window_manager.png) 6 | ![Alt text](./screenshots/pong.png) 7 | ![Alt text](./screenshots/command_list.png) 8 | ![Alt text](./screenshots/filesystem_in_action.png) 9 | ![Alt text](./screenshots/tinytext.png) 10 | 11 | JS-OS is a 32-bit operating system, written mostly in C, that is aiming to become a UNIX- 12 | like clone, but with some added/better capabilities. This project was started in late 2012 by a 13 | high school student and is meant to be a learning/research tool for both the developer and the 14 | user. The code is mostly commented and not too difficult to follow. 15 | 16 | Using this operating system is meant to be easy and very intuitive. It is currently under 17 | development and supports preemptive multitasking, interrupts, a full-blown ext2 file system, a floppy disk driver that has support for having persistent storage, an ext2/JS-OS clone file system (supporting up to 16GB files), a bunch of file system utilities, a basic shell, a dynamic 18 | heap, memory protection, a 32bpp VESA VBE and a VGA driver, a window manager, 19 | keyboard and mouse driver, and a sound driver. 20 | 21 | Compilation dependencies: 22 | - gcc (C compiler; built on version 4.6.3) 23 | - nasm (assembler; built on version 2.09.10) 24 | - ld (linker; built on version 2.22) 25 | 26 | 27 | Released under the GPL license, see LICENSE for more information. 28 | -------------------------------------------------------------------------------- /README/ABOUT: -------------------------------------------------------------------------------- 1 | 2 | JS-OS, version 0.0.2b: 3 | Copyright (c) 2012-2013 JS-OS. All rights reserved. 4 | JS-OS is released under the GNU General Public License 5 | Consult the file 'LICENSE' for further license information 6 | 7 | Support is always great! 8 | If you like what I do, write me an email at 'jsmithcontact@tormail.org', 9 | it is always good to know someone else is interested. 10 | Donations are welcome at my bitcoin wallet: '1D5pnma7E1CP6cquHujycVy79EyXJ3eYEs' -------------------------------------------------------------------------------- /README/BUGS: -------------------------------------------------------------------------------- 1 | When using JS-OS, if you have found any bugs that are not in the know bugs list, please email me 2 | at jsmithcontact@tormail.org with the bug and information as to how you found it. 3 | 4 | Know Bugs 5 | -vesa on real machine -------------------------------------------------------------------------------- /README/COMPILING: -------------------------------------------------------------------------------- 1 | To compile and build JS-OS on a unix-like operating system, follow the following steps 2 | (This is done through command-line) 3 | 4 | -cd to /JS-OS/ 5 | -run the following commands 6 | -./update 7 | -type super user password when prompted 8 | -./run (if qemu (qemu-system-x86_64) is installed) -------------------------------------------------------------------------------- /README/MAKE_INITRD: -------------------------------------------------------------------------------- 1 | To create the initrd of JS-OS on a unix-like operating system, use the script 'make_initrd.sh' in the directory /JS-OS/initrd/. The usage is as follows: 2 | 3 | If there is a file, for example 'test.txt' to create an initrd of it, type: 4 | ./make_initrd.sh test.txt 5 | 6 | For example: './make_initrd.sh test.txt text_file', the initrd will be edited with 'test.txt' in it and will have the name 'text_file' in the initrd itself. 7 | 8 | ./make_initrd supports multiple files by stringing the arguments. 9 | For example two files to initrd: './make_initrd file1 name1 file2 name2' ...ect. -------------------------------------------------------------------------------- /README/TODO: -------------------------------------------------------------------------------- 1 | Items that need to be completed or fixed include: 2 | 3 | Add a stdout, stderror, 4 | Fix k_programs, fdc driver, ext2 fs to make the programs decent in error correction and more stable upon errors 5 | 6 | ELF execution 7 | Proper fopen and fclose for the vfs 8 | file locks for the floppy ext2 file system 9 | 10 | Fix kheap problem 11 | When unifing right in the free function, a heap array header may be found, 12 | but is not in the actual array list. There has been a work around applied 13 | where the operating system detects the flase header, deletes it an moves 14 | on with the freeing of the pointer. -------------------------------------------------------------------------------- /README/USB-BOOT: -------------------------------------------------------------------------------- 1 | To boot floppy.img on a physical machine, a blank usb drive that is formated in FAT32 is required. 2 | 3 | Follow the following steps... 4 | (This is done through command-line on a unix based system) 5 | 6 | -cd to /JS-OS/ 7 | -run the following commands in shell 8 | **************WARNING************** 9 | This will erase and replace any content found in the /boot/ directory along with the 10 | directory itself (presented it exists) of that drive, JS-OS nor its contributers and 11 | developers are NOT responsible for any data loss. THIS SOFTWARE COMES WITH 12 | NO WARRENTY WHATSOEVER. USE AT OWN RISK. 13 | **************WARNING************** 14 | -./usb_make.sh -d (drive location, e.g., /media/) 15 | 16 | *Run ./usb_make.sh -h for help and more options -------------------------------------------------------------------------------- /core/arch/boot.asm: -------------------------------------------------------------------------------- 1 | ; boot.asm 2 | ; 3 | ; Copyright 2013 JS-OS 4 | ; 5 | ; This program is free software; you can redistribute it and/or modify 6 | ; it under the terms of the GNU General Public License as published by 7 | ; the Free Software Foundation; either version 2 of the License, or 8 | ; (at your option) any later version. 9 | ; 10 | ; This program is distributed in the hope that it will be useful, 11 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ; GNU General Public License for more details. 14 | ; 15 | ; You should have received a copy of the GNU General Public License 16 | ; along with this program; if not, write to the Free Software 17 | ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | ; MA 02110-1301, USA. 19 | ; 20 | ; 21 | 22 | ; boot.asm -- Kernel start location. Also defines multiboot header. 23 | 24 | ; Based on code from Bran's kernel development tutorial file start.asm 25 | ; Based on code from JamesM's kernel development tutorials. 26 | 27 | 28 | MBOOT_PAGE_ALIGN equ 1<<0 ; Load kernel and modules on a page boundary 29 | MBOOT_MEM_INFO equ 1<<1 ; Provide your kernel with memory info 30 | MBOOT_HEADER_MAGIC equ 0x1BADB002 ; Multiboot Magic value 31 | ; NOTE: We do not use MBOOT_AOUT_KLUDGE. It means that GRUB does not 32 | ; pass us a symbol table. 33 | MBOOT_HEADER_FLAGS equ MBOOT_PAGE_ALIGN | MBOOT_MEM_INFO 34 | MBOOT_CHECKSUM equ -(MBOOT_HEADER_MAGIC + MBOOT_HEADER_FLAGS) 35 | 36 | 37 | [BITS 32] ; All instructions should be 32-bit. 38 | 39 | [GLOBAL mboot] ; Make 'mboot' accessible from C. 40 | [EXTERN code] ; Start of the '.text' section. 41 | [EXTERN bss] ; Start of the .bss section. 42 | [EXTERN end] ; End of the last loadable section. 43 | 44 | section .__mbHeader 45 | 46 | mboot: 47 | dd MBOOT_HEADER_MAGIC ; GRUB will search for this value on each 48 | ; 4-byte boundary in your kernel file 49 | dd MBOOT_HEADER_FLAGS ; How GRUB should load your file / settings 50 | dd MBOOT_CHECKSUM ; To ensure that the above values are correct 51 | 52 | dd mboot ; Location of this descriptor 53 | dd code ; Start of kernel '.text' (code) section. 54 | dd bss ; End of kernel '.data' section. 55 | dd end ; End of kernel. 56 | 57 | dd start ; Kernel entry point (initial EIP). 58 | 59 | section .text 60 | 61 | [GLOBAL start] ; Kernel entry point. 62 | [EXTERN main] ; This is the entry point of our C code 63 | 64 | start: 65 | ; Load multiboot information: 66 | push esp 67 | push ebx 68 | 69 | ; Execute the kernel: 70 | cli ; Disable interrupts. 71 | 72 | call main ; call our main() function. 73 | 74 | jmp $ ; Enter an infinite loop, to stop the processor 75 | ; executing whatever rubbish is in the memory 76 | ; after our kernel! -------------------------------------------------------------------------------- /core/arch/common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * common.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #include 25 | 26 | // Write a byte out to the specified port. 27 | void outb(u16int port, u8int value) 28 | { 29 | asm volatile ("outb %1, %0" : : "dN" (port), "a" (value)); 30 | } 31 | 32 | u8int inb(u16int port) 33 | { 34 | u8int ret; 35 | asm volatile("inb %1, %0" : "=a" (ret) : "dN" (port)); 36 | return ret; 37 | } 38 | 39 | u16int inw(u16int port) 40 | { 41 | u16int ret; 42 | asm volatile ("inw %1, %0" : "=a" (ret) : "dN" (port)); 43 | return ret; 44 | } 45 | 46 | // Copy len bytes from src to dest. 47 | void memcpy(u8int *dest, const u8int *src, u32int len) 48 | { 49 | const u8int *sp = (const u8int *)src; 50 | u8int *dp = (u8int *)dest; 51 | for(; len != 0; len--) *dp++ = *sp++; 52 | } 53 | 54 | // Write len copies of val into dest. 55 | void memset(u8int *dest, u8int val, u32int len) 56 | { 57 | u8int *temp = (u8int *)dest; 58 | 59 | for ( ; len != 0; len--) 60 | { 61 | *temp++ = val; 62 | 63 | //~ k_printf("\ntemp is: %h", *temp); 64 | } 65 | } 66 | 67 | // Compare two strings. Should return -1 if 68 | // str1 < str2, 0 if they are equal or 1 otherwise. 69 | int strcmp(char *str1, char *str2) 70 | { 71 | int i = 0; 72 | int failed = 0; 73 | while(str1[i] != '\0' && str2[i] != '\0') 74 | { 75 | if(str1[i] != str2[i]) 76 | { 77 | failed = 1; 78 | break; 79 | } 80 | i++; 81 | } 82 | // why did the loop exit? 83 | if( (str1[i] == '\0' && str2[i] != '\0') || (str1[i] != '\0' && str2[i] == '\0') ) 84 | failed = 1; 85 | 86 | return failed; 87 | } 88 | 89 | // Copy the NULL-terminated string src into dest, and 90 | // return dest. 91 | char *strcpy(char *dest, const char *src) 92 | { 93 | do 94 | { 95 | *dest++ = *src++; 96 | } 97 | while (*src != 0); 98 | } 99 | 100 | // Concatenate the NULL-terminated string src onto 101 | // the end of dest, and return dest. 102 | char *strcat(char *dest, const char *src) 103 | { 104 | while (*dest != 0) 105 | { 106 | *dest = *dest++; 107 | } 108 | 109 | do 110 | { 111 | *dest++ = *src++; 112 | } 113 | while (*src != 0); 114 | return dest; 115 | } 116 | 117 | int strlen(char *src) 118 | { 119 | int i = 0; 120 | while (*src++) 121 | i++; 122 | return i; 123 | } 124 | 125 | extern void panic(const char *message, const char *file, u32int line) 126 | { 127 | // We encountered a massive problem and have to stop. 128 | asm volatile("cli"); // Disable interrupts. 129 | 130 | k_printf("PANIC( %s ) at %s:%d\n", message, file, line); 131 | //k_printf(message); 132 | //k_printf(") at "); 133 | //k_printf(file); 134 | //k_printf(":"); 135 | //k_printf("%d", line); 136 | //k_printf("\n"); 137 | // Halt by going into an infinite loop. 138 | for(;;); 139 | } 140 | 141 | extern void panic_assert(const char *file, u32int line, const char *desc) 142 | { 143 | // An assertion failed, and we have to panic. 144 | asm volatile("cli"); // Disable interrupts. 145 | 146 | k_printf("ASSERTION-FAILED( %s ) at %s:%d\n", desc, file, line); 147 | //k_printf(desc); 148 | //k_printf(") at "); 149 | //k_printf(file); 150 | //k_printf(":"); 151 | //k_printf("%d", line); 152 | //k_printf("\n"); 153 | // Halt by going into an infinite loop. 154 | for(;;); 155 | } 156 | -------------------------------------------------------------------------------- /core/arch/cpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cpu.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #include 25 | 26 | unsigned char readCMOS(unsigned char addr) 27 | { 28 | unsigned char ret; 29 | outb(0x70, addr); 30 | asm volatile("jmp 1f; 1: jmp 1f;1:"); 31 | ret = inb(0x71); 32 | asm volatile("jmp 1f; 1: jmp 1f;1:"); 33 | return ret; 34 | } 35 | 36 | void writeCMOS(unsigned char addr, unsigned int value) 37 | { 38 | outb(0x70, addr); 39 | asm volatile("jmp 1f; 1: jmp 1f;1:"); 40 | outb(0x71, value); 41 | asm volatile("jmp 1f; 1: jmp 1f;1:"); 42 | } 43 | 44 | void reboot() 45 | { 46 | outb(0x64, 0xFE); /* send reboot command */ 47 | } 48 | 49 | void print_regs() 50 | { 51 | registers_t *regs; 52 | asm ("movl %%eax, %0\n" 53 | "movl %%ebx, %1\n" 54 | "movl %%ecx, %2\n" 55 | "movl %%edx, %3\n" 56 | : "=m"(regs->eax), "=m"(regs->ebx), "=m"(regs->ecx), "=m"(regs->edx)); 57 | 58 | //asm ("pop %%eax\n" 59 | //"movl %%esp, %1\n" 60 | //"movl %%ebp, %2\n" 61 | //"movl %%esi, %3\n" 62 | //"movl %%edi, %4\n" 63 | //: "=m"(regs->eip), "=m"(regs->esp), "=m"(regs->ebp) 64 | //, "=m"(regs->esi), "=m"(regs->esi)); 65 | 66 | k_printf("eax: %h, ebx: %h, ecx: %h, edx: %h\n", regs->eax, regs->ebx 67 | , regs->ecx, regs->edx); 68 | //k_printf("eip: %h, esp: %h, ebp: %h, esi: %h, edi: %h\n", regs->eip, regs->esp 69 | //, regs->ebp, regs->edi); 70 | } 71 | -------------------------------------------------------------------------------- /core/arch/gdt.asm: -------------------------------------------------------------------------------- 1 | ; gdt.asm 2 | ; 3 | ; Copyright 2013 JS-OS 4 | ; 5 | ; This program is free software; you can redistribute it and/or modify 6 | ; it under the terms of the GNU General Public License as published by 7 | ; the Free Software Foundation; either version 2 of the License, or 8 | ; (at your option) any later version. 9 | ; 10 | ; This program is distributed in the hope that it will be useful, 11 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ; GNU General Public License for more details. 14 | ; 15 | ; You should have received a copy of the GNU General Public License 16 | ; along with this program; if not, write to the Free Software 17 | ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | ; MA 02110-1301, USA. 19 | ; 20 | ; 21 | 22 | 23 | ; gdt.asm -- Contains global descriptor table and interrupt descriptor table 24 | ; setup code. 25 | 26 | ; Based on code from Bran's kernel development tutorials. 27 | ; Based on code from JamesM's kernel development tutorials. 28 | 29 | [GLOBAL gdt_flush] ; Allows the C code to call gdt_flush(). 30 | 31 | gdt_flush: 32 | mov eax, [esp+4] ; Get the pointer to the GDT, passed as a parameter. 33 | lgdt [eax] ; Load the new GDT pointer 34 | 35 | mov ax, 0x10 ; 0x10 is the offset in the GDT to our data segment 36 | mov ds, ax ; Load all data segment selectors 37 | mov es, ax 38 | mov fs, ax 39 | mov gs, ax 40 | mov ss, ax 41 | jmp 0x08:.flush ; 0x08 is the offset to our code segment: Far jump! 42 | .flush: 43 | ret 44 | 45 | [GLOBAL idt_flush] ; Allows the C code to call idt_flush(). 46 | 47 | idt_flush: 48 | mov eax, [esp+4] ; Get the pointer to the IDT, passed as a parameter. 49 | lidt [eax] ; Load the IDT pointer. 50 | ret 51 | 52 | [GLOBAL tss_flush] ; Allows our C code to call tss_flush(). 53 | tss_flush: 54 | mov ax, 0x2B ; Load the index of our TSS structure - The index is 55 | ; 0x28, as it is the 5th selector and each is 8 bytes 56 | ; long, but we set the bottom two bits (making 0x2B) 57 | ; so that it has an RPL of 3, not zero. 58 | ltr ax ; Load 0x2B into the task state register. 59 | ret 60 | -------------------------------------------------------------------------------- /core/arch/interrupt.asm: -------------------------------------------------------------------------------- 1 | ; interrupt.asm 2 | ; 3 | ; Copyright 2013 JS-OS 4 | ; 5 | ; This program is free software; you can redistribute it and/or modify 6 | ; it under the terms of the GNU General Public License as published by 7 | ; the Free Software Foundation; either version 2 of the License, or 8 | ; (at your option) any later version. 9 | ; 10 | ; This program is distributed in the hope that it will be useful, 11 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ; GNU General Public License for more details. 14 | ; 15 | ; You should have received a copy of the GNU General Public License 16 | ; along with this program; if not, write to the Free Software 17 | ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | ; MA 02110-1301, USA. 19 | ; 20 | ; 21 | 22 | ; interrupt.s -- Contains interrupt service routine wrappers. 23 | ; Based on code from Bran's kernel development tutorials. 24 | ; Based on code from JamesM's kernel development tutorials. 25 | 26 | ; This macro creates a stub for an ISR which does NOT pass it's own 27 | ; error code (adds a dummy errcode byte). 28 | %macro ISR_NOERRCODE 1 29 | global isr%1 30 | isr%1: 31 | cli ; Disable interrupts firstly. 32 | push byte 0 ; Push a dummy error code. 33 | push %1 ; Push the interrupt number. 34 | jmp isr_common_stub ; Go to our common handler code. 35 | %endmacro 36 | 37 | ; This macro creates a stub for an ISR which passes it's own 38 | ; error code. 39 | %macro ISR_ERRCODE 1 40 | global isr%1 41 | isr%1: 42 | cli ; Disable interrupts. 43 | push %1 ; Push the interrupt number 44 | jmp isr_common_stub 45 | %endmacro 46 | 47 | ; This macro creates a stub for an IRQ - the first parameter is 48 | ; the IRQ number, the second is the ISR number it is remapped to. 49 | %macro IRQ 2 50 | global irq%1 51 | irq%1: 52 | cli 53 | push byte 0 54 | push byte %2 55 | jmp irq_common_stub 56 | %endmacro 57 | 58 | ISR_NOERRCODE 0 59 | ISR_NOERRCODE 1 60 | ISR_NOERRCODE 2 61 | ISR_NOERRCODE 3 62 | ISR_NOERRCODE 4 63 | ISR_NOERRCODE 5 64 | ISR_NOERRCODE 6 65 | ISR_NOERRCODE 7 66 | ISR_ERRCODE 8 67 | ISR_NOERRCODE 9 68 | ISR_ERRCODE 10 69 | ISR_ERRCODE 11 70 | ISR_ERRCODE 12 71 | ISR_ERRCODE 13 72 | ISR_ERRCODE 14 73 | ISR_NOERRCODE 15 74 | ISR_NOERRCODE 16 75 | ISR_NOERRCODE 17 76 | ISR_NOERRCODE 18 77 | ISR_NOERRCODE 19 78 | ISR_NOERRCODE 20 79 | ISR_NOERRCODE 21 80 | ISR_NOERRCODE 22 81 | ISR_NOERRCODE 23 82 | ISR_NOERRCODE 24 83 | ISR_NOERRCODE 25 84 | ISR_NOERRCODE 26 85 | ISR_NOERRCODE 27 86 | ISR_NOERRCODE 28 87 | ISR_NOERRCODE 29 88 | ISR_NOERRCODE 30 89 | ISR_NOERRCODE 31 90 | ISR_NOERRCODE 128 91 | IRQ 0, 32 92 | IRQ 1, 33 93 | IRQ 2, 34 94 | IRQ 3, 35 95 | IRQ 4, 36 96 | IRQ 5, 37 97 | IRQ 6, 38 98 | IRQ 7, 39 99 | IRQ 8, 40 100 | IRQ 9, 41 101 | IRQ 10, 42 102 | IRQ 11, 43 103 | IRQ 12, 44 104 | IRQ 13, 45 105 | IRQ 14, 46 106 | IRQ 15, 47 107 | 108 | ; In isr.c 109 | extern isr_handler 110 | 111 | ; This is our common ISR stub. It saves the processor state, sets 112 | ; up for kernel mode segments, calls the C-level fault handler, 113 | ; and finally restores the stack frame. 114 | isr_common_stub: 115 | pusha ; Pushes edi,esi,ebp,esp,ebx,edx,ecx,eax 116 | 117 | mov ax, ds ; Lower 16-bits of eax = ds. 118 | push eax ; save the data segment descriptor 119 | 120 | mov ax, 0x10 ; load the kernel data segment descriptor 121 | mov ds, ax 122 | mov es, ax 123 | mov fs, ax 124 | mov gs, ax 125 | 126 | call isr_handler 127 | 128 | pop ebx ; reload the original data segment descriptor 129 | mov ds, bx 130 | mov es, bx 131 | mov fs, bx 132 | mov gs, bx 133 | 134 | popa ; Pops edi,esi,ebp... 135 | add esp, 8 ; Cleans up the pushed error code and pushed ISR number 136 | sti 137 | iret ; pops 5 things at once: CS, EIP, EFLAGS, SS, and ESP 138 | 139 | ; In isr.c 140 | extern irq_handler 141 | 142 | ; This is our common IRQ stub. It saves the processor state, sets 143 | ; up for kernel mode segments, calls the C-level fault handler, 144 | ; and finally restores the stack frame. 145 | irq_common_stub: 146 | pusha ; Pushes edi,esi,ebp,esp,ebx,edx,ecx,eax 147 | 148 | mov ax, ds ; Lower 16-bits of eax = ds. 149 | push eax ; save the data segment descriptor 150 | 151 | mov ax, 0x10 ; load the kernel data segment descriptor 152 | mov ds, ax 153 | mov es, ax 154 | mov fs, ax 155 | mov gs, ax 156 | 157 | call irq_handler 158 | 159 | pop ebx ; reload the original data segment descriptor 160 | mov ds, bx 161 | mov es, bx 162 | mov fs, bx 163 | mov gs, bx 164 | 165 | popa ; Pops edi,esi,ebp... 166 | add esp, 8 ; Cleans up the pushed error code and pushed ISR number 167 | sti 168 | iret ; pops 5 things at once: CS, EIP, EFLAGS, SS, and ESP 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /core/arch/isr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * isr.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #include 25 | 26 | isr_t interrupt_handlers[256]; 27 | 28 | void register_interrupt_handler(u8int n, isr_t handler) 29 | { 30 | interrupt_handlers[n] = handler; 31 | } 32 | 33 | // This gets called from our ASM interrupt handler stub. 34 | void isr_handler(registers_t regs) 35 | { 36 | // This line is important. When the processor extends the 8-bit interrupt number 37 | // to a 32bit value, it sign-extends, not zero extends. So if the most significant 38 | // bit (0x80) is set, regs.int_no will be very large (about 0xffffff80). 39 | u8int int_no = regs.int_no & 0xFF; 40 | if (interrupt_handlers[int_no] != 0) 41 | { 42 | isr_t handler = interrupt_handlers[int_no]; 43 | handler(®s); 44 | }else{ 45 | 46 | //this is bad, spit an error 47 | k_printf("Unhandled interrupt: %h\n", int_no); 48 | for(;;); 49 | } 50 | } 51 | 52 | // This gets called from our ASM interrupt handler stub. 53 | void irq_handler(registers_t regs) 54 | { 55 | // Send an EOI (end of interrupt) signal to the PICs. 56 | // If this interrupt involved the slave. 57 | if (regs.int_no >= 40) 58 | { 59 | // Send reset signal to slave. 60 | outb(0xA0, 0x20); 61 | } 62 | // Send reset signal to master. (As well as slave, if necessary). 63 | outb(0x20, 0x20); 64 | 65 | if (interrupt_handlers[regs.int_no] != 0) 66 | { 67 | isr_t handler = interrupt_handlers[regs.int_no]; 68 | handler(®s); 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /core/arch/process.asm: -------------------------------------------------------------------------------- 1 | ; process.asm 2 | ; 3 | ; Copyright 2013 JS-OS 4 | ; 5 | ; This program is free software; you can redistribute it and/or modify 6 | ; it under the terms of the GNU General Public License as published by 7 | ; the Free Software Foundation; either version 2 of the License, or 8 | ; (at your option) any later version. 9 | ; 10 | ; This program is distributed in the hope that it will be useful, 11 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ; GNU General Public License for more details. 14 | ; 15 | ; You should have received a copy of the GNU General Public License 16 | ; along with this program; if not, write to the Free Software 17 | ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | ; MA 02110-1301, USA. 19 | ; 20 | ; 21 | 22 | ; process.asm -- Gets the current eip running cpu register and can copy 23 | ; physical memory pages 24 | 25 | ; Based on code from JamesM's kernel development tutorials. 26 | 27 | 28 | [GLOBAL read_eip] 29 | read_eip: 30 | pop eax ; Get the return address 31 | jmp eax ; Return. Can't use RET because return 32 | ; address popped off the stack. 33 | 34 | [GLOBAL copy_page_physical] 35 | copy_page_physical: 36 | push ebx ; According to __cdecl, we must preserve the contents of EBX. 37 | pushf ; push EFLAGS, so we can pop it and reenable interrupts 38 | ; later, if they were enabled anyway. 39 | cli ; Disable interrupts, so we aren't interrupted. 40 | ; Load these in BEFORE we disable paging! 41 | mov ebx, [esp+12] ; Source address 42 | mov ecx, [esp+16] ; Destination address 43 | 44 | mov edx, cr0 ; Get the control register... 45 | and edx, 0x7fffffff ; and... 46 | mov cr0, edx ; Disable paging. 47 | 48 | mov edx, 1024 ; 1024*4bytes = 4096 bytes 49 | 50 | .loop: 51 | mov eax, [ebx] ; Get the word at the source address 52 | mov [ecx], eax ; Store it at the dest address 53 | add ebx, 4 ; Source address += sizeof(word) 54 | add ecx, 4 ; Dest address += sizeof(word) 55 | dec edx ; One less word to do 56 | jnz .loop 57 | 58 | mov edx, cr0 ; Get the control register again 59 | or edx, 0x80000000 ; and... 60 | mov cr0, edx ; Enable paging. 61 | 62 | popf ; Pop EFLAGS back. 63 | pop ebx ; Get the original value of EBX back. 64 | ret 65 | -------------------------------------------------------------------------------- /core/arch/timer.c: -------------------------------------------------------------------------------- 1 | /* 2 | * timer.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #include 25 | 26 | u32int tick = 0, globalFreq; 27 | u32int pass = 0, systemTimePassed = 0; 28 | unsigned long long int secondsPassed = 0; 29 | 30 | void sleep(u32int seconds) 31 | { 32 | u32int onOrOff = pass; 33 | u32int timePassed = 0; 34 | 35 | while(timePassed != seconds) 36 | { 37 | if(onOrOff != pass) 38 | { 39 | timePassed++; 40 | onOrOff = pass; 41 | } 42 | } 43 | } 44 | 45 | //~ void mSleep(long long int milliseconds) 46 | void mSleep(u32int milliseconds) 47 | { 48 | 49 | if(milliseconds > 0) 50 | { 51 | unsigned long eticks; 52 | 53 | eticks = systemTimePassed + milliseconds; 54 | while(systemTimePassed < eticks); 55 | } 56 | 57 | } 58 | 59 | unsigned long long int getSystemUpTime() 60 | { 61 | return systemTimePassed; 62 | } 63 | 64 | void timer_callback() 65 | { 66 | tick = (tick + 1) % (globalFreq + 1); 67 | systemTimePassed++; 68 | 69 | if(tick == globalFreq) //one second passed 70 | { 71 | secondsPassed++; 72 | 73 | pass = (pass + 1) % 2; 74 | 75 | } 76 | 77 | //Reduce the running tasks time in queue 78 | if(current_task->time_to_run > 0 && current_task->ready_to_run == TRUE) 79 | { 80 | current_task->time_to_run--; 81 | current_task->time_running++; 82 | }else{ 83 | schedule(); //No time left, reschedule tasks 84 | } 85 | 86 | /* if(systemTimePassed % 1000) 87 | * switch_task(); */ 88 | } 89 | 90 | void init_timer(u32int frequency) 91 | { 92 | globalFreq = frequency; 93 | // Firstly, register our timer callback. 94 | register_interrupt_handler(IRQ0, &timer_callback); 95 | 96 | // The value we send to the PIT is the value to divide it's input clock 97 | // (1193180 Hz) by, to get our required frequency. Important to note is 98 | // that the divisor must be small enough to fit into 16-bits. 99 | u32int divisor = 1193180 / frequency; 100 | 101 | // Send the command byte. 102 | outb(0x43, 0x36); 103 | 104 | // Divisor has to be sent byte-wise, so split here into upper/lower bytes. 105 | u8int l = (u8int)(divisor & 0xFF); 106 | u8int h = (u8int)( (divisor>>8) & 0xFF ); 107 | 108 | // Send the frequency divisor. 109 | outb(0x40, l); 110 | outb(0x40, h); 111 | } 112 | 113 | /*================RTC===================*/ 114 | 115 | #define BCD2BIN(bcd) ((((bcd) & 15) + ((bcd) >> 4) * 10)) 116 | #define MINUTE 60 117 | #define HOUR (60*MINUTE) 118 | #define DAY (24*HOUR) 119 | #define YEAR (365*DAY) 120 | 121 | //Gets CMOS actual time 122 | datetime_t getDatetime() 123 | { 124 | datetime_t now; 125 | 126 | asm volatile("cli"); 127 | now.sec = BCD2BIN(readCMOS(0x0)); 128 | now.min = BCD2BIN(readCMOS(0x2)); 129 | now.hour = BCD2BIN(readCMOS(0x4)); 130 | now.day = BCD2BIN(readCMOS(0x7)); 131 | now.month = BCD2BIN(readCMOS(0x8)); 132 | now.year = BCD2BIN(readCMOS(0x9)); 133 | now.century = BCD2BIN(readCMOS(0x32)); 134 | asm volatile("sti"); 135 | 136 | return now; 137 | } 138 | 139 | /*================Convertor to POSIX===================*/ 140 | 141 | #define Y_TO_SECS(y) (31556000 * y) //there are 31,556,000 seconds in a year (this accounts for a leap year every 4 years) 142 | #define MO_TO_SECS(m) (2629667 * m) //approximation of the amount of seconds per month as the length of a month is not constant 143 | #define D_TO_SECS(d) (86400 * d) //seconds in a day 144 | #define H_TO_SECS(h) (3600 * h) //seconds in an hour 145 | #define MIN_TO_SECS(min) (60 * min) //seconds in a minute 146 | 147 | u32int posix_time() 148 | { 149 | datetime_t time; 150 | u32int years_passed; 151 | 152 | time = getDatetime(); 153 | 154 | //calculate the time pased since the begining of POSIX 155 | years_passed = (time.century * 100 + time.year) - POSIX_YEAR; 156 | 157 | //convert the RTC times to seconds and sum everything up 158 | return Y_TO_SECS(years_passed) + MO_TO_SECS(time.month) + D_TO_SECS(time.day) + H_TO_SECS(time.hour) + MIN_TO_SECS(time.min) + time.sec; 159 | 160 | } 161 | -------------------------------------------------------------------------------- /core/math/k_math.c: -------------------------------------------------------------------------------- 1 | /* 2 | * k_math.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #include 25 | 26 | float math_floor(float floorNumber) 27 | { 28 | float returnFlooredNumber = floorNumber; 29 | 30 | returnFlooredNumber = (float)((int)returnFlooredNumber); 31 | 32 | return returnFlooredNumber; 33 | 34 | } 35 | 36 | float math_ceil(float ceilNumber) 37 | { 38 | float returnCieledNumber = ceilNumber; 39 | 40 | returnCieledNumber = (float)((int)returnCieledNumber) + 1; 41 | 42 | return returnCieledNumber; 43 | } 44 | float math_abs(float absNumber) 45 | { 46 | if(absNumber < 0) 47 | { 48 | //if(absNumber == (int)absNumber) 49 | //{ 50 | //int intAbsNumber = (int)absNumber; 51 | 52 | //intAbsNumber = intAbsNumber << 1; 53 | //intAbsNumber = intAbsNumber >> 1; 54 | 55 | ////~ k_printf("\nabs int: %d", math_abs(-10)); 56 | //return (float)intAbsNumber; 57 | //}else{ 58 | 59 | absNumber = -1 * absNumber; 60 | //return absNumber; 61 | 62 | //} 63 | } //else{ 64 | //~ 65 | return absNumber; 66 | //~ } 67 | 68 | } 69 | 70 | float math_log10 (float logNumber) 71 | { 72 | //TODO make log function 73 | float exp = 0.0, ans = 1.0, expAdder = 1.0; 74 | 75 | while (ans != logNumber) 76 | { 77 | if(ans < logNumber) 78 | { 79 | ans = ans * 10; 80 | exp = exp + expAdder; 81 | }else if(ans > logNumber) 82 | { 83 | expAdder = expAdder / 10; 84 | 85 | ans = ans * 10; 86 | exp = exp - expAdder; 87 | } 88 | } 89 | 90 | if (ans == logNumber) 91 | { 92 | return exp; 93 | }else{ 94 | /*print error*/ 95 | } 96 | } 97 | 98 | int math_intLength(int intNumber) 99 | { 100 | int inv = 0, count = 0, originalInt = intNumber; 101 | 102 | if(intNumber < 0) 103 | { 104 | intNumber = math_abs(intNumber); 105 | } 106 | 107 | while (intNumber > 0) 108 | { 109 | count = count + 1; 110 | 111 | //~ intNumber = intNumber / 10; 112 | 113 | inv = inv * 10 + (intNumber % 10); 114 | intNumber = intNumber / 10; //since reverseNumber is int, dividing by ten also floors integer 115 | } 116 | 117 | if(originalInt != 0) 118 | { 119 | return count; 120 | }else if(originalInt == 0)//if the original in is 0, above will not enter while loop, so count will equal 0 121 | { //and will return a number length of 0, so here i will brute return a length of 1 122 | return 1; 123 | } 124 | 125 | } 126 | 127 | int math_pow(int base, int exponent) 128 | { 129 | int x, output = 1; 130 | 131 | for(x = 0; x < exponent; x++) 132 | { 133 | output = output * base; 134 | } 135 | 136 | return output; 137 | } 138 | -------------------------------------------------------------------------------- /core/ordered_array.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ordered_array.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // ordered_array.c -- Implementation for creating, inserting and deleting 25 | // from ordered arrays. 26 | // Based on code from JamesM's kernel development tutorials. 27 | 28 | #include 29 | 30 | s8int standard_lessthan_predicate(type_t a, type_t b) 31 | { 32 | return (aarray); 60 | } 61 | 62 | void insert_ordered_array(type_t item, ordered_array_t *array) 63 | { 64 | ASSERT(array->less_than); 65 | u32int iterator = 0; 66 | while(iterator < array->size && array->less_than(array->array[iterator], item)) 67 | iterator++; 68 | 69 | if(iterator == array->size) // just add at the end of the array. 70 | array->array[array->size++] = item; 71 | else{ //add the item to the appropriate array 72 | type_t tmp = array->array[iterator]; 73 | array->array[iterator] = item; 74 | while(iterator < array->size) 75 | { 76 | iterator++; 77 | type_t tmp2 = array->array[iterator]; 78 | array->array[iterator] = tmp; 79 | tmp = tmp2; 80 | } 81 | array->size++; 82 | } 83 | } 84 | 85 | type_t lookup_ordered_array(u32int i, ordered_array_t *array) 86 | { 87 | ASSERT(i < array->size); 88 | return array->array[i]; 89 | } 90 | 91 | void remove_ordered_array(u32int i, ordered_array_t *array) 92 | { 93 | 94 | ((header_t*)array->array[i])->magic = 0; 95 | 96 | while (i < array->size) 97 | { 98 | array->array[i] = array->array[i+1]; 99 | i++; 100 | } 101 | array->size--; 102 | } 103 | -------------------------------------------------------------------------------- /core/syscall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * syscall.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // syscall.c -- Defines the implementation of a system call system. 25 | // Based on code from JamesM's kernel development tutorials. 26 | 27 | #include 28 | 29 | static void syscall_handler(registers_t *regs); 30 | 31 | DEFN_SYSCALL1(user_printf, 0, const char*); 32 | DEFN_SYSCALL1(user_putChar, 1, const char); 33 | //~ DEFN_SYSCALL1(monitor_write_dec, 2, const char*); 34 | 35 | static void *syscalls[2] = 36 | { 37 | &k_printf, 38 | &k_putChar 39 | 40 | }; 41 | 42 | u32int num_syscalls = 2; 43 | 44 | void initialise_syscalls() 45 | { 46 | // Register our syscall handler. 47 | register_interrupt_handler (0x80, &syscall_handler); 48 | } 49 | 50 | void syscall_handler(registers_t *regs) 51 | { 52 | // Firstly, check if the requested syscall number is valid. 53 | // The syscall number is found in EAX. 54 | if (regs->eax >= num_syscalls) 55 | return; 56 | 57 | // Get the required syscall location. 58 | void *location = syscalls[regs->eax]; 59 | 60 | // We don't know how many parameters the function wants, so we just 61 | // push them all onto the stack in the correct order. The function will 62 | // use all the parameters it wants, and we can pop them all back off afterwards. 63 | int ret; 64 | asm volatile (" \ 65 | push %1; \ 66 | push %2; \ 67 | push %3; \ 68 | push %4; \ 69 | push %5; \ 70 | call *%6; \ 71 | pop %%ebx; \ 72 | pop %%ebx; \ 73 | pop %%ebx; \ 74 | pop %%ebx; \ 75 | pop %%ebx; \ 76 | " : "=a" (ret) : "r" (regs->edi), "r" (regs->esi), "r" (regs->edx), "r" (regs->ecx), "r" (regs->ebx), "r" (location)); 77 | regs->eax = ret; 78 | } 79 | -------------------------------------------------------------------------------- /debug.sh: -------------------------------------------------------------------------------- 1 | # debug.sh 2 | # 3 | # Copyright 2013 JS-OS 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | # MA 02110-1301, USA. 19 | # 20 | # 21 | 22 | #!/bin/bash 23 | 24 | #~ harddisk_image="harddisk.img" 25 | floppy_image="floppy.img" 26 | storage_image="storage.img" 27 | #~ storage_image="test.img" 28 | 29 | printf "\n--------------------------GDB------[in new terminal window]----" 30 | printf "\ntarget remote localhost:1234" 31 | printf "\nsymbol-file kernel.sym" 32 | printf "\nbreak :" 33 | printf "\nUse 'continue' instead of 'run' in gdb\n" 34 | 35 | #checks if xclip is installed 36 | command -v xclip >/dev/null 2>&1 || { printf '\e[0;31m\n' ; echo >&2 "I require xclip, but it's not installed. It is best to install it."; printf '\e[0m\n'; 37 | 38 | objcopy --only-keep-debug kernel kernel.sym; 39 | qemu-system-x86_64 -m 64M -vga std -soundhw pcspk -s -S -fda "$floppy_image" -fdb "$storage_image" ; exit 1;} 40 | 41 | printf "\nBy default, the initial gdb commands are copied to the clipboard\n\n" 42 | 43 | echo "target remote localhost:1234 44 | symbol-file kernel.sym" | xclip -selection clipboard 45 | 46 | objcopy --only-keep-debug kernel kernel.sym 47 | 48 | qemu-system-x86_64 -m 64M -vga std -soundhw pcspk -s -S -fda "$floppy_image" -fdb "$storage_image" 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/ELF_Format.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/ELF_Format.pdf -------------------------------------------------------------------------------- /docs/FloppyControllerDatasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/FloppyControllerDatasheet.pdf -------------------------------------------------------------------------------- /docs/ext2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/ext2.pdf -------------------------------------------------------------------------------- /docs/ext2_disklayout.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/ext2_disklayout.pdf -------------------------------------------------------------------------------- /docs/floppy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/floppy.pdf -------------------------------------------------------------------------------- /docs/practical-file-system-design.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/docs/practical-file-system-design.pdf -------------------------------------------------------------------------------- /floppy.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/floppy.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/915resolution.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/915resolution.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/acpi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/acpi.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/adler32.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/adler32.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/affs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/affs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/afs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/afs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/afs_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/afs_be.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/aout.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/aout.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/at_keyboard.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/at_keyboard.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ata.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ata.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ata_pthru.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ata_pthru.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/befs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/befs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/befs_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/befs_be.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/biosdisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/biosdisk.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/bitmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/bitmap.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/bitmap_scale.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/bitmap_scale.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/blocklist.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/blocklist.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/boot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/boot.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/boot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/boot.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/bsd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/bsd.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/btrfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/btrfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/bufio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/bufio.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cat.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cat.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cdboot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cdboot.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/chain.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/chain.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cmostest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cmostest.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cmp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cmp.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/command.lst: -------------------------------------------------------------------------------- 1 | *acpi: acpi 2 | *background_image: gfxterm 3 | *cat: cat 4 | *cpuid: cpuid 5 | *crc: hashsum 6 | *drivemap: drivemap 7 | *echo: echo 8 | *functional_test: functional_test 9 | *gettext: gettext 10 | *halt: halt 11 | *hashsum: hashsum 12 | *hdparm: hdparm 13 | *hello: hello 14 | *help: help 15 | *hexdump: hexdump 16 | *inb: iorw 17 | *inl: iorw 18 | *inw: iorw 19 | *keystatus: keystatus 20 | *kfreebsd: bsd 21 | *knetbsd: bsd 22 | *kopenbsd: bsd 23 | *list_env: loadenv 24 | *load_env: loadenv 25 | *loopback: loopback 26 | *ls: ls 27 | *lsacpi: lsacpi 28 | *lspci: lspci 29 | *md5sum: hashsum 30 | *menuentry: normal 31 | *probe: probe 32 | *read_byte: memrw 33 | *read_dword: memrw 34 | *read_word: memrw 35 | *regexp: regexp 36 | *save_env: loadenv 37 | *search: search 38 | *sendkey: sendkey 39 | *serial: serial 40 | *setpci: setpci 41 | *sha1sum: hashsum 42 | *sha256sum: hashsum 43 | *sha512sum: hashsum 44 | *sleep: sleep 45 | *submenu: normal 46 | *terminfo: terminfo 47 | *test_blockarg: test_blockarg 48 | *xnu_splash: xnu 49 | .: configfile 50 | 915resolution: 915resolution 51 | [: test 52 | authenticate: normal 53 | background_color: gfxterm 54 | badram: mmap 55 | blocklist: blocklist 56 | boot: boot 57 | break: normal 58 | cat: minicmd 59 | chainloader: chain 60 | clear: normal 61 | cmosclean: cmostest 62 | cmostest: cmostest 63 | cmp: cmp 64 | configfile: configfile 65 | continue: normal 66 | cutmem: mmap 67 | date: date 68 | dump: minicmd 69 | efiemu_loadcore: efiemu 70 | efiemu_prepare: efiemu 71 | efiemu_unload: efiemu 72 | exit: minicmd 73 | export: normal 74 | extract_entries_configfile: configfile 75 | extract_entries_source: configfile 76 | extract_legacy_entries_configfile: legacycfg 77 | extract_legacy_entries_source: legacycfg 78 | false: true 79 | gptsync: gptsync 80 | help: minicmd 81 | hwmatch: hwmatch 82 | initrd16: linux16 83 | initrd: linux 84 | keymap: keylayouts 85 | kfreebsd_loadenv: bsd 86 | kfreebsd_module: bsd 87 | kfreebsd_module_elf: bsd 88 | knetbsd_module: bsd 89 | knetbsd_module_elf: bsd 90 | kopenbsd_ramdisk: bsd 91 | legacy_check_password: legacycfg 92 | legacy_configfile: legacycfg 93 | legacy_initrd: legacycfg 94 | legacy_initrd_nounzip: legacycfg 95 | legacy_kernel: legacycfg 96 | legacy_password: legacycfg 97 | legacy_source: legacycfg 98 | linux16: linux16 99 | linux: linux 100 | loadfont: font 101 | lsapm: lsapm 102 | lsfonts: font 103 | lsmmap: lsmmap 104 | lsmod: minicmd 105 | module2: multiboot2 106 | module: multiboot 107 | multiboot2: multiboot2 108 | multiboot: multiboot 109 | normal: normal 110 | normal_exit: normal 111 | ntldr: ntldr 112 | outb: iorw 113 | outl: iorw 114 | outw: iorw 115 | parttool: parttool 116 | password: password 117 | password_pbkdf2: password_pbkdf2 118 | play: play 119 | pxe_unload: pxecmd 120 | read: read 121 | reboot: reboot 122 | return: normal 123 | rmmod: minicmd 124 | search.file: search_fs_file 125 | search.fs_label: search_label 126 | search.fs_uuid: search_fs_uuid 127 | setparams: normal 128 | shift: normal 129 | source: configfile 130 | terminal_input: terminal 131 | terminal_output: terminal 132 | test: test 133 | testload: testload 134 | true: true 135 | usb: usbtest 136 | vbeinfo: videoinfo 137 | vbetest: videotest 138 | videoinfo: videoinfo 139 | videotest: videotest 140 | write_byte: memrw 141 | write_dword: memrw 142 | write_word: memrw 143 | xnu_devprop_load: xnu 144 | xnu_kernel64: xnu 145 | xnu_kernel: xnu 146 | xnu_kext: xnu 147 | xnu_kextdir: xnu 148 | xnu_mkext: xnu 149 | xnu_ramdisk: xnu 150 | xnu_resume: xnu 151 | xnu_uuid: xnu_uuid 152 | zfs-bootfs: zfsinfo 153 | zfsinfo: zfsinfo 154 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/configfile.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/configfile.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/core.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/core.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/cpio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cpio.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cpuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cpuid.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/crypto.lst: -------------------------------------------------------------------------------- 1 | RIJNDAEL: gcry_rijndael 2 | RIJNDAEL192: gcry_rijndael 3 | RIJNDAEL256: gcry_rijndael 4 | AES128: gcry_rijndael 5 | AES-128: gcry_rijndael 6 | AES-192: gcry_rijndael 7 | AES-256: gcry_rijndael 8 | ADLER32: adler32 9 | TIGER192: gcry_tiger 10 | RIPEMD160: gcry_rmd160 11 | CAST5: gcry_cast5 12 | RFC2268_40: gcry_rfc2268 13 | DES: gcry_des 14 | 3DES: gcry_des 15 | SERPENT128: gcry_serpent 16 | SERPENT192: gcry_serpent 17 | SERPENT256: gcry_serpent 18 | AES: gcry_rijndael 19 | AES192: gcry_rijndael 20 | AES256: gcry_rijndael 21 | MD5: gcry_md5 22 | CAMELLIA128: gcry_camellia 23 | CAMELLIA192: gcry_camellia 24 | CAMELLIA256: gcry_camellia 25 | SHA512: gcry_sha512 26 | SHA384: gcry_sha512 27 | SHA1: gcry_sha1 28 | SEED: gcry_seed 29 | ARCFOUR: gcry_arcfour 30 | SHA224: gcry_sha256 31 | SHA256: gcry_sha256 32 | TWOFISH: gcry_twofish 33 | TWOFISH128: gcry_twofish 34 | CRC32: gcry_crc 35 | CRC32RFC1510: gcry_crc 36 | CRC24RFC2440: gcry_crc 37 | MD4: gcry_md4 38 | WHIRLPOOL: gcry_whirlpool 39 | BLOWFISH: gcry_blowfish 40 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/crypto.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/crypto.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/cs5536.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/cs5536.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/date.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/date.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/datehook.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/datehook.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/datetime.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/datetime.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/diskboot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/diskboot.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/dm_nv.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/dm_nv.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/drivemap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/drivemap.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/echo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/echo.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/efiemu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/efiemu.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/efiemu32.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/efiemu32.o -------------------------------------------------------------------------------- /grub-boot/boot/grub/efiemu64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/efiemu64.o -------------------------------------------------------------------------------- /grub-boot/boot/grub/elf.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/elf.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/example_functional_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/example_functional_test.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ext2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ext2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/extcmd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/extcmd.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/fat.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/fat.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/font.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/font.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/fs.lst: -------------------------------------------------------------------------------- 1 | affs 2 | afs 3 | afs_be 4 | befs 5 | befs_be 6 | btrfs 7 | cpio 8 | ext2 9 | fat 10 | hfs 11 | hfsplus 12 | iso9660 13 | jfs 14 | minix 15 | minix2 16 | nilfs2 17 | ntfs 18 | pxe 19 | reiserfs 20 | sfs 21 | squash4 22 | tar 23 | udf 24 | ufs1 25 | ufs2 26 | xfs 27 | zfs 28 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/fshelp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/fshelp.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/functional_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/functional_test.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/g2hdr.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/g2hdr.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_arcfour.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_arcfour.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_blowfish.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_blowfish.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_camellia.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_camellia.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_cast5.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_cast5.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_crc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_crc.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_des.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_des.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_md4.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_md4.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_md5.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_md5.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_rfc2268.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_rfc2268.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_rijndael.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_rijndael.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_rmd160.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_rmd160.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_seed.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_seed.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_serpent.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_serpent.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_sha1.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_sha1.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_sha256.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_sha256.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_sha512.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_sha512.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_tiger.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_tiger.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_twofish.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_twofish.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gcry_whirlpool.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gcry_whirlpool.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gettext.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gettext.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gfxmenu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gfxmenu.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gfxterm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gfxterm.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/gptsync.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gptsync.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/grldr.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/grldr.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/grub.cfg: -------------------------------------------------------------------------------- 1 | set timeout=15 2 | set default=0 # Set the default menu entry 3 | 4 | menuentry "JS-OS" { 5 | multiboot /boot/kernel # The multiboot command replaces the kernel command 6 | module /boot/initrd.img 7 | boot 8 | } -------------------------------------------------------------------------------- /grub-boot/boot/grub/grubenv: -------------------------------------------------------------------------------- 1 | # GRUB Environment Block 2 | ####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### -------------------------------------------------------------------------------- /grub-boot/boot/grub/gzio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/gzio.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/halt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/halt.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hashsum.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hashsum.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hdparm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hdparm.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hello.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hello.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/help.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/help.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hexdump.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hexdump.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hfsplus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hfsplus.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/hwmatch.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/hwmatch.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/iorw.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/iorw.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/iso9660.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/iso9660.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/jfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/jfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/jpeg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/jpeg.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/kernel.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/kernel.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/keylayouts.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/keylayouts.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/keystatus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/keystatus.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/legacycfg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/legacycfg.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/linux.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/linux.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/linux16.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/linux16.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lnxboot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lnxboot.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/loadenv.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/loadenv.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/locale/en_AU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/locale/en_AU.mo -------------------------------------------------------------------------------- /grub-boot/boot/grub/locale/en_CA.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/locale/en_CA.mo -------------------------------------------------------------------------------- /grub-boot/boot/grub/locale/en_GB.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/locale/en_GB.mo -------------------------------------------------------------------------------- /grub-boot/boot/grub/loopback.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/loopback.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ls.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ls.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lsacpi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lsacpi.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lsapm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lsapm.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lsmmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lsmmap.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lspci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lspci.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lvm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lvm.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/lzopio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/lzopio.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/mdraid09.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/mdraid09.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/mdraid1x.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/mdraid1x.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/memdisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/memdisk.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/memrw.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/memrw.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/minicmd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/minicmd.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/minix.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/minix.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/minix2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/minix2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/mmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/mmap.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/moddep.lst: -------------------------------------------------------------------------------- 1 | squash4: gzio fshelp 2 | search_fs_uuid: 3 | legacycfg: linux gcry_md5 crypto password normal 4 | date: datetime normal 5 | uhci: pci usb 6 | multiboot2: boot video acpi relocator mmap lsapm vbe 7 | gcry_twofish: crypto 8 | cmostest: 9 | gcry_rijndael: crypto 10 | echo: extcmd 11 | cpio: 12 | xzio: gcry_crc 13 | part_sun: 14 | gcry_sha512: crypto 15 | gcry_cast5: crypto 16 | boot: 17 | ls: extcmd normal 18 | gzio: 19 | video: 20 | test_blockarg: extcmd normal 21 | gfxterm: video extcmd bitmap_scale bitmap font 22 | gcry_tiger: crypto 23 | gcry_serpent: crypto 24 | aout: 25 | gcry_blowfish: crypto 26 | trig: 27 | extcmd: 28 | at_keyboard: boot keylayouts 29 | videoinfo: video 30 | pxe: bufio 31 | minix: 32 | keylayouts: 33 | xnu_uuid: gcry_md5 34 | usbtest: usb 35 | usbms: usb scsi 36 | reboot: 37 | help: extcmd normal 38 | part_msdos: 39 | blocklist: 40 | probe: extcmd 41 | pbkdf2: crypto 42 | gcry_rfc2268: crypto 43 | gcry_camellia: crypto 44 | fat: 45 | pci: 46 | parttool: normal 47 | lzopio: crypto 48 | linux: boot video relocator mmap vbe normal 49 | gcry_md4: crypto 50 | zfsinfo: zfs 51 | usb_keyboard: keylayouts usb 52 | gcry_md5: crypto 53 | fshelp: 54 | bitmap_scale: bitmap 55 | ata: pci scsi 56 | datetime: 57 | usbserial_common: usb serial 58 | gcry_des: crypto 59 | reiserfs: fshelp 60 | dm_nv: raid 61 | datehook: datetime normal 62 | afs_be: fshelp 63 | efiemu: acpi gcry_crc 64 | kernel: 65 | video_cirrus: video pci video_fb 66 | gcry_seed: crypto 67 | crypto: 68 | test: 69 | terminal: 70 | lsacpi: extcmd acpi 71 | jpeg: bufio bitmap 72 | bsd: boot video aout extcmd cpuid elf relocator serial mmap vbe 73 | memdisk: 74 | gfxmenu: video gfxterm trig bitmap_scale bitmap normal font 75 | cmp: 76 | acpi: extcmd mmap 77 | xfs: fshelp 78 | elf: 79 | cpuid: extcmd 80 | affs: fshelp 81 | usb: pci 82 | videotest: video gfxmenu font 83 | testload: 84 | relocator: 85 | play: 86 | adler32: crypto 87 | pxecmd: pxe 88 | password: crypto normal 89 | part_sunpc: 90 | video_fb: video 91 | sleep: extcmd normal 92 | serial: extcmd terminfo 93 | search_fs_file: 94 | gcry_sha256: crypto 95 | gcry_rmd160: crypto 96 | search: search_fs_uuid extcmd search_fs_file search_label 97 | mdraid09: raid 98 | chain: boot video 99 | memrw: extcmd 100 | cs5536: pci 101 | ata_pthru: ata 102 | password_pbkdf2: gcry_sha512 pbkdf2 crypto normal 103 | mdraid1x: raid 104 | linux16: boot video relocator mmap 105 | gcry_crc: crypto 106 | configfile: normal 107 | befs: fshelp 108 | raid5rec: raid 109 | gcry_arcfour: crypto 110 | sendkey: boot extcmd 111 | gettext: 112 | hello: extcmd 113 | vga_text: 114 | usbserial_pl2303: usbserial_common usb serial 115 | hashsum: extcmd crypto normal 116 | regexp: extcmd normal 117 | part_gpt: 118 | ohci: boot pci usb cs5536 119 | gptsync: 120 | zfs: gzio 121 | part_apple: 122 | hdparm: extcmd 123 | bufio: 124 | btrfs: gzio lzopio 125 | bitmap: 126 | true: 127 | terminfo: extcmd 128 | ntfscomp: ntfs 129 | hfs: 130 | biosdisk: 131 | ufs1: 132 | ntldr: boot video relocator 133 | setjmp: 134 | ufs2: 135 | nilfs2: fshelp 136 | lsmmap: 137 | gcry_sha1: crypto 138 | 915resolution: 139 | mmap: boot 140 | befs_be: fshelp 141 | tar: 142 | png: bufio bitmap 143 | lspci: extcmd pci 144 | hfsplus: fshelp 145 | tga: bufio bitmap 146 | minix2: 147 | setpci: extcmd pci 148 | scsi: 149 | raid: 150 | lvm: 151 | lsapm: 152 | functional_test: extcmd 153 | iso9660: fshelp 154 | vbe: video video_fb 155 | udf: fshelp 156 | search_label: 157 | raid6rec: raid 158 | msdospart: parttool 159 | halt: extcmd acpi 160 | xnu: boot video extcmd bitmap_scale efiemu relocator bitmap 161 | read: 162 | multiboot: boot video relocator mmap lsapm vbe 163 | keystatus: extcmd 164 | normal: boot gfxterm extcmd crypto terminal 165 | video_bochs: video pci video_fb 166 | sfs: fshelp 167 | part_amiga: 168 | loopback: extcmd 169 | jfs: 170 | part_acorn: 171 | iorw: extcmd 172 | hwmatch: pci normal 173 | cat: extcmd 174 | afs: fshelp 175 | hexdump: extcmd 176 | usbserial_ftdi: usbserial_common usb serial 177 | minicmd: 178 | loadenv: extcmd 179 | gcry_whirlpool: crypto 180 | drivemap: boot extcmd mmap 181 | vga: video video_fb 182 | part_bsd: part_msdos 183 | font: video bufio 184 | ext2: fshelp 185 | example_functional_test: functional_test 186 | ntfs: fshelp 187 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/msdospart.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/msdospart.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/multiboot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/multiboot.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/multiboot2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/multiboot2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/nilfs2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/nilfs2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/normal.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/normal.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ntfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ntfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ntfscomp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ntfscomp.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ntldr.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ntldr.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ohci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ohci.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_acorn.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_acorn.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_amiga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_amiga.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_apple.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_apple.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_bsd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_bsd.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_gpt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_gpt.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_msdos.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_msdos.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_sun.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_sun.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/part_sunpc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/part_sunpc.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/partmap.lst: -------------------------------------------------------------------------------- 1 | part_acorn 2 | part_amiga 3 | part_apple 4 | part_bsd 5 | part_gpt 6 | part_msdos 7 | part_sun 8 | part_sunpc 9 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/parttool.lst: -------------------------------------------------------------------------------- 1 | msdos: msdospart 2 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/parttool.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/parttool.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/password.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/password.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/password_pbkdf2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/password_pbkdf2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/pbkdf2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/pbkdf2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/pci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/pci.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/play.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/play.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/png.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/png.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/probe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/probe.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/pxe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/pxe.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/pxeboot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/pxeboot.img -------------------------------------------------------------------------------- /grub-boot/boot/grub/pxecmd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/pxecmd.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/raid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/raid.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/raid5rec.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/raid5rec.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/raid6rec.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/raid6rec.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/read.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/read.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/reboot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/reboot.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/regexp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/regexp.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/reiserfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/reiserfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/relocator.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/relocator.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/scsi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/scsi.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/search.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/search.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/search_fs_file.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/search_fs_file.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/search_fs_uuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/search_fs_uuid.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/search_label.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/search_label.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/sendkey.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/sendkey.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/serial.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/serial.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/setjmp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/setjmp.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/setpci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/setpci.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/sfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/sfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/sleep.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/sleep.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/squash4.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/squash4.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/tar.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/tar.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/terminal.lst: -------------------------------------------------------------------------------- 1 | iat_keyboard: at_keyboard 2 | iserial: serial 3 | iserial_*: serial 4 | ogfxterm: gfxterm 5 | oserial: serial 6 | oserial_*: serial 7 | ovga_text: vga_text 8 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/terminal.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/terminal.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/terminfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/terminfo.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/test.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/test_blockarg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/test_blockarg.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/testload.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/testload.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/tga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/tga.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/trig.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/trig.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/true.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/true.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/udf.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/udf.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ufs1.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ufs1.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/ufs2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/ufs2.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/uhci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/uhci.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usb.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usb.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usb_keyboard.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usb_keyboard.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usbms.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usbms.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usbserial_common.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usbserial_common.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usbserial_ftdi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usbserial_ftdi.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usbserial_pl2303.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usbserial_pl2303.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/usbtest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/usbtest.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/vbe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/vbe.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/vga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/vga.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/vga_text.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/vga_text.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/video.lst: -------------------------------------------------------------------------------- 1 | vbe 2 | vga 3 | video_bochs 4 | video_cirrus 5 | -------------------------------------------------------------------------------- /grub-boot/boot/grub/video.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/video.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/video_bochs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/video_bochs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/video_cirrus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/video_cirrus.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/video_fb.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/video_fb.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/videoinfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/videoinfo.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/videotest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/videotest.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/xfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/xfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/xnu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/xnu.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/xnu_uuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/xnu_uuid.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/xzio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/xzio.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/zfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/zfs.mod -------------------------------------------------------------------------------- /grub-boot/boot/grub/zfsinfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/grub-boot/boot/grub/zfsinfo.mod -------------------------------------------------------------------------------- /include/arch/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * common.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef COMMON_H 25 | #define COMMON_H 26 | 27 | // Some nice typedefs, to standardise sizes across platforms. 28 | // These typedefs are written for 32-bit x86. 29 | typedef unsigned int u32int; 30 | typedef int s32int; 31 | typedef unsigned short u16int; 32 | typedef short s16int; 33 | typedef unsigned char u8int; 34 | typedef char s8int; 35 | 36 | void outb(u16int port, u8int value); 37 | u8int inb(u16int port); 38 | u16int inw(u16int port); 39 | 40 | #define PANIC(msg) panic(msg, __FILE__, __LINE__); 41 | #define ASSERT(b) ((b) ? (void)0 : panic_assert(__FILE__, __LINE__, #b)) 42 | 43 | extern void panic(const char *message, const char *file, u32int line); 44 | extern void panic_assert(const char *file, u32int line, const char *desc); 45 | 46 | #define TRUE 1 //define a few variable 47 | #define ON 1 48 | #define FALSE 0 49 | #define OFF 0 50 | 51 | #endif //COMMON_H 52 | -------------------------------------------------------------------------------- /include/arch/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cpu.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef CPU_H 25 | #define CPU_H 26 | 27 | /*reads the CMOS memory*/ 28 | unsigned char readCMOS(unsigned char addr); 29 | 30 | /*writes to the CMOS memory*/ 31 | void writeCMOS(unsigned char addr, unsigned int value); 32 | 33 | /*command to reboot the system*/ 34 | void reboot(); 35 | 36 | /*print the cpu registers*/ 37 | void print_regs(); 38 | 39 | #endif //CPU_H 40 | -------------------------------------------------------------------------------- /include/arch/isr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * isr.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | 25 | // isr.h -- Interface and structures for high level interrupt service routines. 26 | // Based on code from JamesM's kernel development tutorials. 27 | // 28 | 29 | #ifndef ISR_H 30 | #define ISR_H 31 | 32 | // A few defines to make life a little easier 33 | #define IRQ0 32 34 | #define IRQ1 33 35 | #define IRQ2 34 36 | #define IRQ3 35 37 | #define IRQ4 36 38 | #define IRQ5 37 39 | #define IRQ6 38 40 | #define IRQ7 39 41 | #define IRQ8 40 42 | #define IRQ9 41 43 | #define IRQ10 42 44 | #define IRQ11 43 45 | #define IRQ12 44 46 | #define IRQ13 45 47 | #define IRQ14 46 48 | #define IRQ15 47 49 | 50 | typedef struct registers 51 | { 52 | u32int ds; // Data segment selector 53 | u32int edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha. 54 | u32int int_no, err_code; // Interrupt number and error code (if applicable) 55 | u32int eip, cs, eflags, useresp, ss; // Pushed by the processor automatically. 56 | } registers_t; 57 | 58 | // Enables registration of callbacks for interrupts or IRQs. 59 | // For IRQs, to ease confusion, use the #defines above as the 60 | // first parameter. 61 | typedef void (*isr_t)(registers_t*); 62 | 63 | #include 64 | 65 | void register_interrupt_handler(u8int n, isr_t handler); 66 | 67 | #endif //ISR_H 68 | -------------------------------------------------------------------------------- /include/arch/kheap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * kheap.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // kheap.h -- Interface for kernel heap functions, also provides 25 | // a placement malloc() for use before the heap is 26 | // initialised. 27 | // Based on code from JamesM's kernel development tutorials. 28 | 29 | #ifndef KHEAP_H 30 | #define KHEAP_H 31 | 32 | #define KHEAP_START 0x40000000 33 | #define KHEAP_INITIAL_SIZE 0x1000000 34 | 35 | #define HEAP_INDEX_SIZE 0x20000 36 | #define HEAP_MAGIC 0xDEADBEEF 37 | #define HEAP_MIN_SIZE 0x70000 38 | 39 | #include 40 | 41 | /** 42 | Size information for a hole/block 43 | **/ 44 | typedef struct 45 | { 46 | u32int magic; // Magic number, used for error checking and identification. 47 | u8int is_hole; // 1 if this is a hole. 0 if this is a block. 48 | u32int size; // size of the block, including the end footer. 49 | 50 | }header_t; 51 | 52 | typedef struct 53 | { 54 | u32int magic; // Magic number, same as in header_t. 55 | header_t *header; // Pointer to the block header. 56 | 57 | }footer_t; 58 | 59 | typedef struct 60 | { 61 | ordered_array_t index; 62 | u32int start_address; // The start of our allocated space. 63 | u32int end_address; // The end of our allocated space. May be expanded up to max_address. 64 | u32int max_address; // The maximum address the heap can be expanded to. 65 | u8int supervisor; // Should extra pages requested by us be mapped as supervisor-only? 66 | u8int readonly; // Should extra pages requested by us be mapped as read-only? 67 | 68 | }heap_t; 69 | 70 | 71 | /** 72 | Create a new heap. 73 | **/ 74 | heap_t *create_heap(u32int start, u32int end, u32int max, u8int supervisor, u8int readonly); 75 | 76 | /** 77 | Allocates a contiguous region of memory 'size' in size. If page_align==1, it creates that block starting 78 | on a page boundary. 79 | **/ 80 | void *alloc(u32int size, u8int page_align, heap_t *heap); 81 | 82 | /** 83 | Releases a block allocated with 'alloc'. 84 | **/ 85 | void free(void *p, heap_t *heap); 86 | 87 | /** 88 | Allocate a chunk of memory, sz in size. If align == 1, 89 | the chunk must be page-aligned. If phys != 0, the physical 90 | location of the allocated chunk will be stored into phys. 91 | 92 | This is the internal version of kmalloc. More user-friendly 93 | parameter representations are available in kmalloc, kmalloc_a, 94 | kmalloc_ap, kmalloc_p. 95 | **/ 96 | u32int kmalloc_int(u32int sz, int align, u32int *phys); 97 | 98 | /** 99 | Allocate a chunk of memory, sz in size. The chunk must be 100 | page aligned. 101 | **/ 102 | u32int kmalloc_a(u32int sz); 103 | 104 | /** 105 | Allocate a chunk of memory, sz in size. The physical address 106 | is returned in phys. Phys MUST be a valid pointer to u32int! 107 | **/ 108 | u32int kmalloc_p(u32int sz, u32int *phys); 109 | 110 | /** 111 | Allocate a chunk of memory, sz in size. The physical address 112 | is returned in phys. It must be page-aligned. 113 | **/ 114 | u32int kmalloc_ap(u32int sz, u32int *phys); 115 | 116 | /** 117 | General allocation function. 118 | **/ 119 | u32int kmalloc(u32int sz); 120 | 121 | /** 122 | General deallocation function. 123 | **/ 124 | void kfree(void *p); 125 | 126 | /** 127 | Returns the amount of space the input pointer has alloced 128 | **/ 129 | u32int size_of_alloc(void *alloc); 130 | 131 | /*For reallocation of kmallocs, regular, a, p, ap*/ 132 | u32int krealloc(u32int *ptr, u32int old_sz, u32int new_sz); 133 | u32int krealloc_a(u32int *ptr, u32int old_sz, u32int new_sz); 134 | u32int krealloc_ap(u32int *ptr, u32int old_sz, u32int new_sz, u32int *phys); 135 | u32int krealloc_p(u32int *ptr, u32int old_sz, u32int new_sz, u32int *phys); 136 | 137 | #endif // KHEAP_H 138 | -------------------------------------------------------------------------------- /include/arch/paging.h: -------------------------------------------------------------------------------- 1 | /* 2 | * paging.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // paging.h -- Defines the interface for and structures relating to paging. 25 | // Based on code from JamesM's kernel development tutorials. 26 | 27 | #ifndef PAGING_H 28 | #define PAGING_H 29 | 30 | #define KHEAP_MAX_ADDRESS 0xFFFF000 31 | 32 | typedef struct page 33 | { 34 | u32int present : 1; // Page present in memory 35 | u32int rw : 1; // Read-only if clear, readwrite if set 36 | u32int user : 1; // Supervisor level only if clear 37 | u32int accessed : 1; // Has the page been accessed since last refresh? 38 | u32int dirty : 1; // Has the page been written to since last refresh? 39 | u32int unused : 7; // Amalgamation of unused and reserved bits 40 | u32int frame : 20; // Frame address (shifted right 12 bits) 41 | } page_t; 42 | 43 | typedef struct page_table 44 | { 45 | page_t pages[1024]; 46 | } page_table_t; 47 | 48 | typedef struct page_directory 49 | { 50 | /** 51 | Array of pointers to pagetables. 52 | **/ 53 | page_table_t *tables[1024]; 54 | /** 55 | Array of pointers to the pagetables above, but gives their *physical* 56 | location, for loading into the CR3 register. 57 | **/ 58 | u32int tablesPhysical[1024]; 59 | 60 | /** 61 | The physical address of tablesPhysical. This comes into play 62 | when we get our kernel heap allocated and the directory 63 | may be in a different location in virtual memory. 64 | **/ 65 | u32int physicalAddr; 66 | } page_directory_t; 67 | 68 | #include 69 | 70 | extern page_directory_t *current_directory; 71 | 72 | 73 | /** 74 | Sets up the environment, page directories etc and 75 | enables paging. 76 | **/ 77 | void initialise_paging(u32int memorySize); 78 | 79 | /** 80 | Causes the specified page directory to be loaded into the 81 | CR3 register. 82 | **/ 83 | void switch_page_directory(page_directory_t *new); 84 | 85 | /** 86 | Retrieves a pointer to the page required. 87 | If make == 1, if the page-table in which this page should 88 | reside isn't created, create it! 89 | **/ 90 | page_t *get_page(u32int address, u32int make, page_directory_t *dir); 91 | 92 | /** 93 | Handler for page faults. 94 | **/ 95 | void page_fault(registers_t *regs); 96 | 97 | /** 98 | Makes a copy of a page directory. 99 | **/ 100 | page_directory_t *clone_directory(page_directory_t *src); 101 | 102 | 103 | /** 104 | Pages memory at a given location 105 | **/ 106 | void pageMem(u32int location); 107 | 108 | /** 109 | Maps virtual pages 110 | **/ 111 | void virtual_map_pages(long addr, long size, u32int rw, u32int user); 112 | 113 | #endif //PAGING_H 114 | -------------------------------------------------------------------------------- /include/arch/task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * task.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef TASK_H 25 | #define TASK_H 26 | 27 | #include 28 | 29 | #define KERNEL_STACK_SIZE 2048 // Use a 2kb kernel stack. 30 | 31 | //process priorities 32 | #define PRIO_DEAD 9900 33 | #define PRIO_IDLE 0 34 | #define PRIO_LOW 100 35 | #define PRIO_MED 200 36 | #define PRIO_HIGH 300 37 | 38 | //process length times 39 | #define PROC_VERY_LONG 10 40 | #define PROC_LONG 30 41 | #define PROC_MED 50 42 | #define PROC_SHORT 70 43 | #define PROC_VERY_SHORT 90 44 | 45 | // This structure defines a 'task' - a process. 46 | typedef struct task 47 | { 48 | u32int id; //Process ID 49 | 50 | //~ char name[32]; //Process name 51 | //~ u32int name; //Process name 52 | 53 | u32int esp, ebp; //Stack and base pointers. 54 | u32int eip; //Instruction pointer. 55 | 56 | u32int priority; //the priority of the process 57 | u32int burst_time; //the process burst time 58 | u32int averaged_priority; //A number that indicates average priority (priority and burst time) 59 | 60 | u32int time_to_run; //Time left on quanta 61 | u32int time_running; //Time spent running 62 | u32int ready_to_run; //is the process ready to run 63 | 64 | page_directory_t *page_directory; // Page directory. 65 | 66 | void (*thread)(); //thread entry point 67 | u32int thread_flags; //location of an array of thread arguments to go allong with that function 68 | 69 | u32int stack; //kernel stack location. 70 | u32int originalStack; //the original kernel stack location. 71 | 72 | struct task *next; //the next task in a linked list. 73 | }task_t; 74 | 75 | extern volatile task_t *ready_queue; 76 | 77 | //The currently running task. 78 | extern volatile task_t *current_task; 79 | 80 | /*Initialises the tasking system*/ 81 | void initialise_tasking(); 82 | 83 | /*Called by the timer hook, this changes the running process to the next one in the list*/ 84 | void switch_task(); 85 | 86 | /*sets the input task as the current*/ 87 | void set_current_task(task_t *task_to_set); 88 | 89 | /*Forks the current process, spawning a new one with a different memory space*/ 90 | s32int fork(u32int priority, u32int burst_time, char *task_Name); 91 | 92 | /*Causes the current process' stack to be forcibly moved to a new location*/ 93 | void move_stack(void *new_stack_start, u32int size); 94 | 95 | /*Returns the pid of the current process*/ 96 | int getpid(); 97 | 98 | /*kills a task*/ 99 | int kill_task(u32int pid); 100 | 101 | /*start a task*/ 102 | u32int start_task(u32int priority, u32int burst_time, void (*func)(), void *arg, char *task_Name); 103 | 104 | /*a test for the multitasking*/ 105 | void tasking_test(); 106 | 107 | /*end the current task*/ 108 | void exit(); 109 | 110 | void __test__(); 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /include/arch/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * timer.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef TIMER_H 25 | #define TIMER_H 26 | 27 | #include 28 | 29 | typedef struct{ 30 | u8int sec; 31 | u8int min; 32 | u8int hour; 33 | u8int day; 34 | u8int month; 35 | u8int year; 36 | u8int century; 37 | }datetime_t; 38 | 39 | #define POSIX_YEAR 1970 40 | 41 | extern u32int globalFreq; 42 | 43 | /*initialize the timer*/ 44 | void init_timer(u32int frequency); 45 | 46 | /*sleep function in seconds*/ 47 | void sleep(u32int seconds); 48 | 49 | /*sleep function in milliseconds*/ 50 | void mSleep(u32int milliseconds); 51 | 52 | /*gets the RTC clock time*/ 53 | datetime_t getDatetime(); 54 | 55 | /*returns the current time in POSIX time*/ 56 | u32int posix_time(); 57 | 58 | #endif //TIMER_H 59 | -------------------------------------------------------------------------------- /include/crypt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * crypt.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef CRYPT_H 25 | #define CRYPT_H 26 | 27 | #include 28 | 29 | //the DES encryption's meta data 30 | typedef struct des_header 31 | { 32 | u32int size; 33 | u32int magic; 34 | } des_header_t; 35 | 36 | /*for encryption using Ceaser shift*/ 37 | u8int *en_ceaser_shift(u8int *data, u32int size_bytes, u8int shift); 38 | 39 | /*for decryption using Ceaser shift*/ 40 | u8int *de_ceaser_shift(u8int *data, u8int orig_shift); 41 | 42 | /*for encryption using Vigenere cipher*/ 43 | u8int *en_vigenere_cipher(u8int *data, u32int size_bytes, char *key); 44 | 45 | /*for decryption using Vigenere cipher*/ 46 | u8int *de_vigenere_cipher(u8int *data, char *key); 47 | 48 | /*for encryption using the bitwise xor cipher*/ 49 | u8int *en_bitwise_xor(u8int *data, u32int size_bytes, char *pass_phrase); 50 | 51 | /*for decryption using the bitwise xor cipher*/ 52 | u8int *de_bitwise_xor(u8int *data, char *pass_phrase); 53 | 54 | /*for encryption using the DES cipher*/ 55 | u8int *en_DES_cipher(u8int *input, u32int size_bytes, char *pass_phrase); 56 | 57 | /*for decryption using the DES cipher*/ 58 | u8int *de_DES_cipher(u8int *input, char *pass_phrase); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /include/drivers/fdc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fdc.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | 25 | #ifndef FDC_H 26 | #define FDC_H 27 | 28 | //DMA length 29 | #define DMA_LEN 0x4800 //18 KB, most efficient transfer size for 1.44MB floppy disks 30 | #define SECTOR_SIZE 512 //512 bytes sector size 31 | #define FLOPPY_SIZE 0x168000 //1440 KB (1.44MB) 32 | 33 | //floppy persisten storage 34 | extern u32int _FloppyStorage; 35 | 36 | /*initialize the floppy disk*/ 37 | u32int init_floppy(); 38 | 39 | /*set the floppy dma*/ 40 | u32int set_floppy_dma(u8int dir); 41 | 42 | /*waits untill the floppy irq has been recieved*/ 43 | void floppy_wait_irq(); 44 | 45 | /*the irq handler for the floppy*/ 46 | void floppy_handler(); 47 | 48 | /*send a command to the floppy*/ 49 | void floppy_send_command(u8int command); 50 | 51 | /*read the FIFO*/ 52 | u8int floppy_read_data(); 53 | 54 | /*get the status of the floppy*/ 55 | u8int floppy_status(); 56 | 57 | /*write to the digital output register (dor)*/ 58 | void floppy_write_dor(u8int val); 59 | 60 | /*write to the configuration control register (ccr)*/ 61 | void floppy_write_ccr(u8int val); 62 | 63 | /*resets (restarts) the floppy controller*/ 64 | u32int floppy_reset(); 65 | 66 | /*checks the interrupt status of the floppy controller*/ 67 | void floppy_check_int(u32int *st0, u32int *cyl); 68 | 69 | /*sets controlling info to mechanical drive*/ 70 | void floppy_drive_data(u32int stepr, u32int loadt, u32int unloadt, u32int dma); 71 | 72 | /*calibrate a floppy drive*/ 73 | u32int floppy_calibrate(u8int drive); 74 | 75 | /*sets the floppy motor to an input state (on/off)*/ 76 | void floppy_motor(u32int state, u8int drive); 77 | 78 | /*read data from the floppy*/ 79 | u8int *floppy_read(u32int sectorLBA, u32int size, u32int *output); 80 | 81 | /*write data to the floppy*/ 82 | u8int *floppy_write(u32int *data, u32int size, u32int sectorLBA); 83 | 84 | /*move r/w head to input cylinder*/ 85 | u32int floppy_seek(u32int cyl, u8int head); 86 | 87 | /*read data from a specific sector*/ 88 | void floppy_read_sector(u8int head, u8int track, u8int sector, u32int size); 89 | 90 | /*write data to a specific sector*/ 91 | void floppy_write_sector(u8int head, u8int track, u8int sector); 92 | 93 | /*change floppy drives*/ 94 | u32int floppy_change_drive(u8int drive); 95 | 96 | /*calculates the number of times the head will switch, floppies can switch up to twice before reset*/ 97 | u32int floppy_nhead_switches(u32int sector, u32int size); 98 | 99 | #endif //FDC_H 100 | -------------------------------------------------------------------------------- /include/drivers/vesa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vesa.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef V86 25 | #define V86 26 | 27 | #include 28 | 29 | #define MAX_BUTTONS 10 30 | #define MAX_CHILDREN 100 31 | 32 | struct window; 33 | 34 | //~ typedef int (*callback_type_t)(int x, int y); 35 | typedef void (*callback_type_t)(struct window); 36 | 37 | typedef struct component 38 | { 39 | int x; 40 | int y; 41 | int width; 42 | int height; 43 | callback_type_t onMouseLeftClick; 44 | } component_t; 45 | 46 | typedef struct window 47 | { 48 | char *name; 49 | int id; 50 | int parentid; 51 | int x; 52 | int y; 53 | int width; 54 | int height; 55 | u32int *data; 56 | float z; 57 | 58 | char *flag; 59 | component_t buttons[MAX_BUTTONS]; 60 | } window_t; 61 | 62 | 63 | //Colors 64 | #define WINDOW_COLOUR_BORDER 0x397D02 65 | 66 | #define WINDOW_COLOUR_TOPBAR 0x83F52C 67 | #define WINDOW_COLOUR_FOCUS_TOPBAR 0x7FFF00 68 | #define WINDOW_COLOUR_TOPBAR_TEXT 0x397D02 69 | 70 | #define WINDOW_COLOUR_BACKGROUND 0xC5E3BF 71 | 72 | /*sets the vesa graphics*/ 73 | void setVesa(u32int mode); 74 | 75 | #define VBE_DISPI_INDEX_ID 0x0 76 | #define VBE_DISPI_INDEX_XRES 0x1 77 | #define VBE_DISPI_INDEX_YRES 0x2 78 | #define VBE_DISPI_INDEX_BPP 0x3 79 | #define VBE_DISPI_INDEX_ENABLE 0x4 80 | #define VBE_DISPI_INDEX_BANK 0x5 81 | #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6 82 | #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7 83 | #define VBE_DISPI_INDEX_X_OFFSET 0x8 84 | #define VBE_DISPI_INDEX_Y_OFFSET 0x9 85 | #define VBE_DISPI_INDEX_NB 0xa 86 | #define VBE_DISPI_ID0 0xB0C0 87 | #define VBE_DISPI_ID1 0xB0C1 88 | #define VBE_DISPI_ID2 0xB0C2 89 | #define VBE_DISPI_DISABLED 0x00 90 | #define VBE_DISPI_ENABLED 0x01 91 | #define VBE_DISPI_LFB_ENABLED 0x40 92 | #define VBE_DISPI_NOCLEARMEM 0x80 93 | #define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000 94 | #define VBE_DISPI_IOPORT_INDEX 0x01CE 95 | #define VBE_DISPI_IOPORT_DATA 0x01CF 96 | 97 | /*initializes the Window Manager*/ 98 | void init_window_manager(); 99 | 100 | /*creates an object that is a pixbuf*/ 101 | window_t createPixbufObject(char *windowname, unsigned long *pixbuf, int x, int y, int priority, int width, int height, window_t parent); 102 | 103 | /*destroys a window/object */ 104 | void destroyWindow(window_t windowToDestroy); 105 | 106 | /*sees if a window is above a given point*/ 107 | int isWindowAbovePoint(int x, int y, int index); 108 | 109 | /*gets the color of the pixel (x,y)*/ 110 | unsigned long int getPixelColorOfObject(int xFromTopLeft, int yFromTopLeft, int index); 111 | 112 | /*refreshes the entire screen*/ 113 | void refresh_BufScreen(); 114 | 115 | /*refresh the an area on the screen*/ 116 | void refresh_BufArea(int xLoc, int yLoc, int width, int height, int updateScreen); 117 | 118 | /*refreshes the object with a buffer*/ 119 | void refresh_BufObject(window_t object, int xBuffer, int yBuffer); 120 | 121 | /*gets the index of the highest window on point (x, y)*/ 122 | int highestWindowAbovePoint(int x, int y, int ignoreObject); 123 | 124 | /*Translates an object*/ 125 | void translateObject(int object, int xMovement, int yMovement); 126 | 127 | /*Creates a standard window*/ 128 | window_t createWindow(char *windowname, int x, int y, int priority, int width, int height, window_t parent); 129 | 130 | /*creates and object with a constant fill*/ 131 | window_t createObject(char *windowname, int x, int y, int priority, int width, int height, int fill, window_t parent); 132 | 133 | /*returns the number of pixels to go down untill a new, higher object apears*/ 134 | int pixelsNextObjectDown(int x, int y, int index); 135 | 136 | /*sets a window to be the current window, highest window of all windows*/ 137 | void currentWindow(window_t object); 138 | 139 | /*updates a window's information in struct to array window_list[]*/ 140 | void updateWindowListData(window_t object); 141 | 142 | /**Window Buttons**/ 143 | 144 | /*creates a button on a window*/ 145 | component_t createButton(int x, int y, int width, int height, long int *buttonPixBuf, void (*onLeftClick)(window_t widget), window_t window); 146 | 147 | /*creates a button that has not pixbuf/color/fill, and invisible button*/ 148 | component_t createInvisibleButton(int x, int y, int width, int height, void (*onLeftClick)(window_t widget)); 149 | 150 | /*gets the index of the button on window index under point (x,y)*/ 151 | int buttonOnWindow(int x, int y, int indexOfWindow); 152 | 153 | /*maximizes the window*/ 154 | void maximizeWindow(window_t windowToMaximize); 155 | 156 | /*minimizes the window*/ 157 | void minimizeWindow(window_t windowToMinimize); 158 | 159 | /*function that is called when user hits topbar and drags mouse to move the window*/ 160 | void topBarMoveWindow(window_t windowToMove); 161 | 162 | /*adds a button to an object*/ 163 | void addButtonToObject(int x, int y, int width, int height, long int *pixBuf, void(*call_back)(window_t widget), window_t parent); 164 | 165 | #endif 166 | -------------------------------------------------------------------------------- /include/elf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * elf.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // Based on code from CakeOS 25 | 26 | #ifndef ELF_H 27 | #define ELF_H 28 | 29 | /* programHeader defines */ 30 | /* type */ 31 | #define PT_NULL 0 /* Unused */ 32 | #define PT_LOAD 1 /* Loadable segment (fileSize bytes) */ 33 | #define PT_DYNAMIC 2 /* Dynamic segment */ 34 | #define PT_INTERP 3 /* Size and location of null-ended path to interpreter */ 35 | #define PT_NOTE 4 /* Note segment */ 36 | #define PT_SHLIB 5 /* Reserved */ 37 | #define PT_PHDR 6 /* Size and location of program header */ 38 | #define PT_HIPROC 0x7fffffff /* Reserved */ 39 | #define PT_LOPROC 0x70000000 /* Reserved */ 40 | /* !programHeader defines */ 41 | 42 | struct elfhdr 43 | { 44 | u8int ident[16]; /* Elf identification */ 45 | u16int type; /* Type of ELF - 2 for Exectuable, 3 for Lib */ 46 | u16int machine; /* Architecture - 7 for x86 */ 47 | u32int version; /* 0 for invalid, 1 for valid */ 48 | u32int entry; /* Entry point - Point EIP here */ 49 | u32int phoff; /* Address of programHeader struct */ 50 | u32int shoff; /* Address of sectionHeader */ 51 | u32int flags; /* Machine flags - 0 for x86 */ 52 | u16int ehsize; /* elfHeader size */ 53 | u16int phentsize; /* Entry size from programHeader */ 54 | u16int phnum; /* Number of entries in programHeader */ 55 | u16int shentsize; /* Entry size of sectionHeader */ 56 | u16int shnum; /* Number of entries in sectionHeader */ 57 | u16int shstrndx; /* sectionHeader string index */ 58 | } __attribute__((packed)); 59 | 60 | typedef struct elfhdr elfHeader; 61 | 62 | struct prgmhdr 63 | { 64 | u32int type; /* This contains the segment type */ 65 | u32int offset; /* Beginning of program */ 66 | u32int vaddr; /* Virtual addressm to relocate to */ 67 | u32int paddr; /* Physical address of above - Ignore */ 68 | u32int fileSize; /* Size of program */ 69 | u32int memSize; /* Memory size of program */ 70 | u32int flags; /* Flags relevent to segment */ 71 | u32int alignment; /* Alignment - 0 or 1 for none, Positive for align to value */ 72 | /* NOTE: vaddr should equal offset */ 73 | } __attribute__((packed)); 74 | 75 | typedef struct prgmhdr programHeader; 76 | 77 | /*executes the binary at a given address*/ 78 | void execute_binary(u32int addr); 79 | 80 | /*load an elf binary for execution*/ 81 | u32int load_elf(u32int inode, u32int size); 82 | 83 | #endif //ELF_H 84 | -------------------------------------------------------------------------------- /include/gui/graphics.h: -------------------------------------------------------------------------------- 1 | /* 2 | * graphics.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef GRAPHICS 25 | #define GRAPHICS 26 | 27 | #include 28 | 29 | typedef struct objects{ 30 | char *name; 31 | int x; 32 | int y; 33 | int width; 34 | int height; 35 | int color; 36 | 37 | int borderColor; //border 38 | int borderSize; 39 | 40 | int shouldHide; //if window should hide or not 41 | 42 | float priority; //priority 43 | float belongsToIndex; //belongs to parent with index 44 | 45 | //-------Signals-------// 46 | void (*onLeftClick)(); 47 | void (*onMiddleClick)(); 48 | void (*onRightClick)(); 49 | 50 | }objects; 51 | 52 | //typedef struct subObjects{ 53 | ////~ int x; 54 | ////~ int y; 55 | ////~ int width; 56 | ////~ int height; 57 | ////~ int color; 58 | ////~ int priority; 59 | ////~ 60 | ////~ //-------Signals-------// 61 | ////~ void (*onLeftClick)(); 62 | ////~ void (*onMiddleClick)(); 63 | ////~ void (*onRightClick)(); 64 | //objects subs[10]; 65 | 66 | //}subObjects; 67 | 68 | #define ALPHA -2 69 | #define PLOT_ALPHA -3 70 | 71 | /*Initialize videomode*/ 72 | void VGA_init(int width, int height, int bpp); 73 | 74 | /*Initialize textmode*/ 75 | void set_text_mode(int hi_res); 76 | 77 | /*place a pixel on the screen with location x,y and color*/ 78 | void putPixel_simpleStd(int x, int y, int color); 79 | 80 | /*place rectangle on screen with top left (x,y) co-ord, width, length, and fill color*/ 81 | void putRect(int x, int y, int width, int height, int fill); 82 | 83 | /*place rectangle on screen with top left (x,y) co-ord, width, length, and pixbuf as the color*/ 84 | void putPixbufRect(int x, int y, int width, int height, int *pixbuf); 85 | 86 | /*gets the width of a pixbuf*/ 87 | int getPixbufWidth(int *pixbuf); 88 | 89 | /*gets the height of a pixbuf*/ 90 | int getPixbufHeight(int *pixbuf); 91 | 92 | /*place line starting at (x1,y1) to (x2,y2) with color of fill*/ 93 | void putLine(int x1, int y1, int x2, int y2, int fill); 94 | 95 | /*puts a horizontal or verticle line, "H" or "V" at (x,y) with length*/ 96 | void putHVLine(int x, int y, int length, int color, char *HorV); 97 | 98 | /*Draws the border of an object*/ 99 | void putBorderOnObject(objects *object, int index); 100 | 101 | /*Puts a char at (x,y) while in graphical mode*/ 102 | void putGraphicChar(char *letter, int x, int y, int color, int fontSize); 103 | 104 | /*Puts a string starting at (x, y) while in graphical mode*/ 105 | void putGraphicString(char *string, int x, int y, int color, int fontSize); 106 | 107 | /*clears the screen, makes it all white*/ 108 | void VGA_clear_screen(); 109 | 110 | /*Refresh an array of objects*/ 111 | void refreshObjects(objects *number, int numberOfObjects, int indexToRefresh, int xBuffer, int yBuffer, int *pixbuf); 112 | void refreshScreen_std(objects *number, int numberOfObjects); 113 | void refreshArea(objects *number, int numberOfObjects, int topLeftX, int topLeftY, int width, int height); 114 | 115 | /*sees if object is above a point given*/ 116 | int isObjectAbovePoint(int x, int y, objects *object, int index); 117 | int isAttributeAbovePoint(int pointX, int pointY, int x, int y, int width, int height); 118 | 119 | /*sees if two objects have collided*/ 120 | int objectsCollision(objects *object, int firstIndex, int secondIndex, int xBufferCollision, int yBufferCollision); 121 | 122 | /*returns the index of the object directly below the index given in*/ 123 | int indexOfObjectBelow(objects *number, int numberOfObjects, int indexOfObjectToLookUnder, int x, int y); 124 | 125 | /*returns the index of the highest object above a point input*/ 126 | int indexOfHighestObjectAbovePoint(int x, int y, objects *object, int numberOfObjects); 127 | 128 | /*VGA inits*/ 129 | static void set_plane(unsigned p); 130 | static void vpokeb(unsigned int off, unsigned int val); 131 | static unsigned vpeekb(unsigned off); 132 | 133 | /*Sync buffer*/ 134 | static void vsync(); 135 | 136 | /*Used to copy double buffer to vga_mem*/ 137 | static void g_flip(unsigned char *source, u32int count); 138 | 139 | /*VESA*/ 140 | void putPixel_VESA(int x, int y, int RGB); 141 | 142 | /*Refresh VESA screen*/ 143 | void refreshScreen_VESA(); 144 | void refreshArea_VESA(int x, int y, int width, int height); 145 | 146 | /*Plot buffered Rect and Pixel*/ 147 | void plot_BufRect(int x, int y, int width, int height, int isPixbuf, long *pixbuf, int fill, int widthOfWholeWindow, u32int *buffer); 148 | void plot_BufPixel(int x, int y, int RGB, int width, u32int *buffer); 149 | 150 | /*writes buffer to the double buffer*/ 151 | void writePixelToDoubleBuffer(unsigned x, unsigned y, unsigned RGB); 152 | void write_buffer(unsigned x, unsigned y, unsigned width, unsigned height, u32int *buffer); 153 | 154 | /*Writes text to buffer*/ 155 | void plot_BufString(int x, int y, char *string, int color, int widthOfWholeWindow, u32int *buffer); 156 | 157 | 158 | #endif 159 | -------------------------------------------------------------------------------- /include/gui/x_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * x_server.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef XSERVER 25 | #define XSERVER 26 | 27 | #include 28 | 29 | #define MAX_PRIORITY 255 30 | 31 | /*function that initializes the X server*/ 32 | void xServer(); 33 | 34 | /*moves the mouse x,y units*/ 35 | void moveMouse(int x, int y); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/initrd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * initrd.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef INITRD_H 25 | #define INITRD_H 26 | 27 | #include 28 | 29 | #define FS_SIZE sizeof(fs_node_t) * 0x4000 30 | #define BLOCK_SIZE 1024 31 | #define DIRECTORY_SIZE BLOCK_SIZE //the size of the directory (bytes) 32 | 33 | extern fs_node_t *root_nodes; // List of file nodes. 34 | 35 | typedef struct 36 | { 37 | u32int nfiles; // The number of files in the ramdisk. 38 | } initrd_header_t; 39 | 40 | typedef struct 41 | { 42 | u8int magic; // Magic number, for error checking. 43 | s8int name[128]; // Filename. 44 | u32int offset; // Offset in the initrd that the file starts. 45 | u32int length; // Length of the file. 46 | } initrd_file_header_t; 47 | 48 | //set the initial file desctripter to be globally gloabal :) 49 | extern file_desc_t *initial_fdesc; 50 | 51 | /*Initialises the initial ramdisk. It gets passed the address of the multiboot module, 52 | * and returns a completed filesystem node */ 53 | fs_node_t *initialise_initrd(u32int location); 54 | 55 | /*returns a dirent at the location of index (NOTE: the index does 56 | * not have to equal the inode of that dirent) */ 57 | struct dirent *initrd_readdir(fs_node_t *dirNode, u32int index); 58 | 59 | /*returns the fs_node_t information of a file in the directory dirNode 60 | * with the filename of char *name */ 61 | fs_node_t *initrd_finddir(fs_node_t *dirNode, char *name); 62 | 63 | /*reads from file*/ 64 | u32int initrd_read(fs_node_t *node, u32int offset, u32int size, u8int *buffer); 65 | 66 | /*writes to a file*/ 67 | u32int initrd_write(fs_node_t *node, u32int offset, u32int size, u8int *buffer); 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /include/k_programs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * k_programs.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef PROGRAMS_H 25 | #define PROGRAMS_H 26 | 27 | #include 28 | 29 | extern unsigned char lowerCaseKbdus[128]; 30 | extern unsigned char upperCaseKbdus[128]; 31 | 32 | /*function that gets input index and runs corresponding function*/ 33 | void runShellFunction(u32int runFunction, char *arguements, u32int priority, u32int burst_time, u8int multitask); 34 | 35 | /*program list starts here*/ 36 | void program_ascii(char *arguements); //0 index --prints ascii animals 37 | 38 | void program_echo(char *arguements); //1 index --prints the arg put in 39 | 40 | void program_tinytext(char *arguements); //2 index --very simple text editor 41 | 42 | //PONG// 43 | void program_GUI_pong(char *arguements); //3 index --play pong 44 | void movePongBall(u32int reset); 45 | void pongRestart(); 46 | //PONG// 47 | 48 | void program_song(char *arguements); //4 index --plays some small tunes 49 | 50 | void program_JS_viewer(char *arguements); //5 index --a simple image viewer 51 | 52 | void program_start(char *arguements); //6 index --starts programs (like start X) 53 | 54 | void program_ls(char *arguements); //7 index --lists the files in a current directory 55 | 56 | int program_cd(char *arguements); //8 index --changes directory 57 | 58 | void program_now(char *arguements); //9 index --gives the current hr:min:sec month/day/year 59 | 60 | void program_mkdir(char *arguements); //10 index --creates a directory 61 | 62 | u32int program_cp(char *arguements); //11 index --copies a file to dest (2 argument) 63 | 64 | void program_cat(char *arguements); //12 index --prints the contents of a file, byte by byte 65 | 66 | void program_rm(char *arguements); //13 index --removes a file 67 | 68 | void program_pwd(char *arguements); //14 index --prints the path from root to the current dir 69 | 70 | void program_help(char *arguements); //15 index --prints help contents 71 | 72 | void program_mv(char *arguements); //16 index --move (rename) a file to a dest 73 | 74 | void program_find(char *arguments); //17 index --find a file in a directory 75 | void find_set_current_dir(); //sets the initial dir for the find command, used with recursion within command 76 | 77 | void program_about(char *arguements); //18 index --print information about the project 78 | 79 | /*a count down timer that displays numbers and counts down every second, ie: 3, 2, 1,*/ 80 | u32int count_down(u32int seconds); 81 | 82 | void program_jpg(char *arguements); //19 index --John's Privacy Guard for encryption 83 | 84 | u32int program_mount(char *arguments); //20 index --mounts a block device 85 | 86 | #endif //PROGRAMS_H 87 | 88 | -------------------------------------------------------------------------------- /include/k_shell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * k_shell.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef SHELL_H 25 | #define SHELL_H 26 | 27 | #include 28 | 29 | #define LS_DIR_COLOR "%Cbk%clbl" //black background with light blue text 30 | #define LS_BLKDEV_COLOR "%Cbk%cg" //black background with light blue text 31 | #define LS_DEFAULT_COLOR "%Cbk%cw" //black background with white text 32 | 33 | /*adds a " ->" indent*/ 34 | void addShellIndent(); 35 | 36 | /*prints the greeting message*/ 37 | void greeting_message(); 38 | 39 | /*gets string input from previous line*/ 40 | void getTypedText(int charCount, int startingYPos, int cursor_y, char *c); 41 | 42 | /*reads inputs for shell*/ 43 | void executeInput(char *input, char *arguements); 44 | 45 | /*gets the input and spits it into command (written in char *input string) and arguments*/ 46 | void formatInput(char *input, char *arguements); 47 | 48 | /*function that removes trailing space if there is one*/ 49 | int removeTrailingSpaces(char *string); 50 | 51 | /*saves input char array in shell to array so it can be accessed later*/ 52 | void saveInputToBuffer(char *input); 53 | 54 | /*prints the input buffer in an array for shell to access previous inputs*/ 55 | void printInputBuffer(s32int direction); //value of 1 meaning up and -1 meaning down the array 56 | 57 | /*function that turns on or off if addShellIndent() should print the indent or not*/ 58 | void turnShellIndentOnOff(int onOrOff); 59 | 60 | /*function that turns on or off if input should be taken when typing*/ 61 | void turnShellInputOnOff(int onOrOff); 62 | 63 | /*sets the functions to a pointer for when the arrow keys are pressed*/ 64 | void arrowKeyFunction(char *callOrWrite, char *keys, void (*func)(int)); 65 | 66 | /*returns the number of args in the char *args*/ 67 | int countArgs(char *args); 68 | 69 | /*given a string of args and outputs a char *args[numberOfArgs] to access each argument individually 70 | *also returns the number of arguments*/ 71 | int getArgs(char *args, char **output); 72 | 73 | /*gets input char *args that is a file path, cd's to that path and return 74 | * the path of dirs and the file in the input path */ 75 | int cdFormatArgs(char *args, char *dirPath, char *filePath); 76 | 77 | /*gets the size of the directory names and file names 78 | * in a path char *args 79 | * dirCount, and fileCount should be unused [constant] integers*/ 80 | void dirFilePathCount(char *args, u32int *dirCount, u32int *fileCount); 81 | 82 | /*compares two file name, smarter than strcmp since it supports "*" 83 | * to represent any character */ 84 | int compareFileName(char *testName, char *fileName); 85 | 86 | /*returns the next option (flag)*/ 87 | int getopt(int argIndex, int nArgs, char **args, const char *optString); 88 | 89 | /*for multitaksing, gets the args allong with a process thread in a task*/ 90 | void get_task_args(char *arguements); 91 | 92 | /*checks if the user want the shell command to be multasking enabled, 93 | * that is checked by looking to see if the user put an '&' at the end of the input*/ 94 | u8int is_enable_multitask(char *arguements); 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /include/k_stdio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * k_stdio.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef K_STDIO 25 | #define K_STDIO 26 | 27 | #include 28 | 29 | // A few defines to make life a little easier 30 | #define BLACK 0 31 | #define DARK_BLUE 1 32 | #define DARK_GREEN 2 33 | #define DARK_CYAN 3 34 | #define DARK_RED 4 35 | #define DARK_MAGENTA 5 36 | #define BROWN 6 37 | #define LIGHT_GREY 7 38 | #define DARK_GREY 8 39 | #define LIGHT_BLUE 9 40 | #define LIGHT_GREEN 10 41 | #define LIGHT_CYAN 11 42 | #define LIGHT_RED 12 43 | #define LIGHT_MAGENTA 13 44 | #define YELLOW 14 45 | #define WHITE 15 46 | 47 | /*a few simple defines*/ 48 | 49 | extern u16int *video_memory; 50 | 51 | /* enum k_fprintf_types = { 52 | * 53 | * }; */ 54 | 55 | /*Write a single character out to the screen.*/ 56 | void k_putChar(char c); 57 | 58 | /*Clear the screen to all black*/ 59 | void k_clear(); 60 | 61 | /*Save screen to char array*/ 62 | void k_save(); 63 | 64 | /*Restore screen from char array*/ 65 | void k_restore(); 66 | 67 | /*Output a null-terminated ASCII string to the monitor*/ 68 | void k_printf(char *c, ...); 69 | 70 | /*k_printf function where developer can set location as to where to print*/ 71 | void k_setprintf(int x, int y, char *text, void *arg1, void *arg2, void *arg3); 72 | 73 | /*Convert an integer to a char array ex: 123 to [1,2,3]*/ 74 | void k_intToChar(int integer, char *numbersInChar); 75 | 76 | /*Convert char array with numer ex:[1,2,3] to ASCII [49, 50, 51]*/ 77 | void k_numbersToAsciInChar(char *asciInChar, int integerLength); 78 | 79 | /*Compares two stings, return 0 if same and 1 if different*/ 80 | int k_strcmp(char *stringOne, char *stringTwo); 81 | 82 | /*Gets the length of a string*/ 83 | int k_strlen(char *string); 84 | 85 | /*A substring function where start and end are inclusive*/ 86 | void k_strchop(char *stringIn, char *stringOut, int start, int end); 87 | 88 | /*copies one char array to another char array*/ 89 | void k_strcpy(char *input, char *output); 90 | 91 | /*sorts an integer array fpr lowest to highest*/ 92 | void k_sortArray(int *array, int count); 93 | 94 | 95 | /*Other functions*/ 96 | 97 | /*Function that shifts the cursor depending on the shift amount*/ 98 | void shiftCursor(int shiftAmount); 99 | 100 | /*functions that have a normal movement for the cursor depending on the value of "movement" 101 | * -1 is either left if in normalHCursor or down if in normalVCursor 102 | * 1 is either right if in normalHCursor or up if in normalVCursor*/ 103 | void normalHCursor(int movement); 104 | void normalVCursor(int movement); 105 | 106 | /*Set the charCount back to 0*/ 107 | void resetCharCount(void); 108 | 109 | /*gets input char pointer and detroys it*/ 110 | void destroyCharPointer(char *pointer); 111 | 112 | /*gets or sets the starting cursor_y of a shell input*/ 113 | void startingCursorY(void); 114 | 115 | /*returns the cursor_x value*/ 116 | int getCursorXValue(void); 117 | 118 | /*finds out how many elements there are in a char array*/ 119 | int k_elemInCharArray(char *array); 120 | 121 | /*function that delets a line on the screen*/ 122 | void deleteLine(int yValue); // if yValue < 0, then deletes line of cursor_y 123 | 124 | /*function that sets the cursor_y minimum and maximum value*/ 125 | void setScreenYMinMax(int yMinimun, int yMaximum); // if arg is negative, yMin/yMax will not change 126 | 127 | /*print a possible non-stable release warning*/ 128 | void k_warning(char *warning, char *added_text, u32int row); 129 | 130 | /*prints the same text, used for verbose functions to keep the trail of '.' growing after the ...*/ 131 | void working(); 132 | 133 | /*scans input text*/ 134 | u32int k_scanf(char *type, u8int **ptr); 135 | 136 | #endif // K_STDIO 137 | -------------------------------------------------------------------------------- /include/keyboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * keyboard.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef KEYBOARD_H 25 | #define KEYBOARD_H 26 | 27 | #include 28 | 29 | /*Initialize the keyboard*/ 30 | void init_keyboard(); 31 | 32 | /*function that checks for special keys, up, down, left, right, etc*/ 33 | int isSpecialKey(unsigned char keyPressChar); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/math/k_math.h: -------------------------------------------------------------------------------- 1 | /* 2 | * k_math.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef K_MATH 25 | #define K_MATH 26 | 27 | /*floors a number*/ 28 | float math_floor(float floorNumber); 29 | 30 | /*ceils a number*/ 31 | float math_ceil(float ceilNumber); 32 | 33 | /*gets the absolute value of a number*/ 34 | float math_abs(float absNumber); 35 | 36 | //Make this log10 work 37 | float math_log10 (float logNumber); 38 | 39 | /*finds the length of an integer, ex: if input == 10, output would == 2, if input == 12345, output == 5*/ 40 | int math_intLength(int intNumber); 41 | 42 | /*takes the power of a number, only works with positive exponent, as of NOW*/ 43 | int math_pow(int base, int exponent); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /include/mouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mouse.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef MOUSE 25 | #define MOUSE 26 | 27 | /*Handles the mouse interrupt */ 28 | void mouseInput_handler(); 29 | 30 | /*Installs the mouse handler into IRQ12 */ 31 | void init_mouse(); 32 | //~ void mouse_install(); 33 | 34 | /*sets/calls functions for left/middle/right click*/ 35 | void mouseClickFunctions(char *callOrWrite, char *buttonClick, void (*func)() ); 36 | 37 | /*disables the mouse*/ 38 | void disableMousePackets(); 39 | 40 | /*enables the mouse*/ 41 | void enableMousePackets(); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/multiboot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * multiboot.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef MULTIBOOT_H 25 | #define MULTIBOOT_H 26 | 27 | #include 28 | 29 | #define MULTIBOOT_FLAG_MEM 0x001 30 | #define MULTIBOOT_FLAG_DEVICE 0x002 31 | #define MULTIBOOT_FLAG_CMDLINE 0x004 32 | #define MULTIBOOT_FLAG_MODS 0x008 33 | #define MULTIBOOT_FLAG_AOUT 0x010 34 | #define MULTIBOOT_FLAG_ELF 0x020 35 | #define MULTIBOOT_FLAG_MMAP 0x040 36 | #define MULTIBOOT_FLAG_CONFIG 0x080 37 | #define MULTIBOOT_FLAG_LOADER 0x100 38 | #define MULTIBOOT_FLAG_APM 0x200 39 | #define MULTIBOOT_FLAG_VBE 0x400 40 | 41 | struct multiboot 42 | { 43 | u32int flags; 44 | u32int mem_lower; 45 | u32int mem_upper; 46 | u32int boot_device; 47 | u32int cmdline; 48 | u32int mods_count; 49 | u32int mods_addr; 50 | u32int num; 51 | u32int size; 52 | u32int addr; 53 | u32int shndx; 54 | u32int mmap_length; 55 | u32int mmap_addr; 56 | u32int drives_length; 57 | u32int drives_addr; 58 | u32int config_table; 59 | u32int boot_loader_name; 60 | u32int apm_table; 61 | u32int vbe_control_info; 62 | u32int vbe_mode_info; 63 | u32int vbe_mode; 64 | u32int vbe_interface_seg; 65 | u32int vbe_interface_off; 66 | u32int vbe_interface_len; 67 | } __attribute__((packed)); 68 | 69 | typedef struct multiboot_header multiboot_header_t; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /include/ordered_array.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ordered_array.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // ordered_array.h -- Interface for creating, inserting and deleting 25 | // from ordered arrays. 26 | // Based on code from JamesM's kernel development tutorials. 27 | 28 | #ifndef ORDERED_ARRAY_H 29 | #define ORDERED_ARRAY_H 30 | 31 | /** 32 | This array is insertion sorted - it always remains in a sorted state (between calls). 33 | It can store anything that can be cast to a void* -- so a u32int, or any pointer. 34 | **/ 35 | typedef void* type_t; 36 | /** 37 | A predicate should return nonzero if the first argument is less than the second. Else 38 | it should return zero. 39 | **/ 40 | typedef s8int (*lessthan_predicate_t)(type_t,type_t); 41 | typedef struct 42 | { 43 | type_t *array; 44 | u32int size; 45 | u32int max_size; 46 | lessthan_predicate_t less_than; 47 | } ordered_array_t; 48 | 49 | #include 50 | 51 | /** 52 | A standard less than predicate. 53 | **/ 54 | s8int standard_lessthan_predicate(type_t a, type_t b); 55 | 56 | /** 57 | Create an ordered array. 58 | **/ 59 | ordered_array_t create_ordered_array(u32int max_size, lessthan_predicate_t less_than); 60 | ordered_array_t place_ordered_array(void *addr, u32int max_size, lessthan_predicate_t less_than); 61 | 62 | /** 63 | Destroy an ordered array. 64 | **/ 65 | void destroy_ordered_array(ordered_array_t *array); 66 | 67 | /** 68 | Add an item into the array. 69 | **/ 70 | void insert_ordered_array(type_t item, ordered_array_t *array); 71 | 72 | /** 73 | Lookup the item at index i. 74 | **/ 75 | type_t lookup_ordered_array(u32int i, ordered_array_t *array); 76 | 77 | /** 78 | Deletes the item at location i from the array. 79 | **/ 80 | void remove_ordered_array(u32int i, ordered_array_t *array); 81 | 82 | #endif // ORDERED_ARRAY_H 83 | -------------------------------------------------------------------------------- /include/schedule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * schedule.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef SCHEDULE 25 | #define SCHEDULE 26 | 27 | #include 28 | 29 | /*a pointer to a function that rearranges the tasks in some order*/ 30 | void (*rearrange_schedule)(void); 31 | 32 | /*our scheduling algorithm*/ 33 | void schedule(); 34 | 35 | /***************************** 36 | * algorthms table contents * 37 | * 0-prioritized round robin * 38 | * 1-prioritized SJF * 39 | /*****************************/ 40 | void set_scheduling_algorithm(u32int algorithm_number); 41 | 42 | ///scheduling algorithms/// 43 | 44 | /*arranges the tasks in the order of a prioritzed SJF (shorstest job first)*/ 45 | void sjf_arrange(); 46 | 47 | /*puts a task in its propper location in the list when initilalizing the task*/ 48 | void preempt_task(task_t *task_to_preempt); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /include/sound.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sound.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef SOUND 25 | #define SOUND 26 | 27 | #include 28 | 29 | /*make the audio beep at frequency for milliseconds time*/ 30 | void beep(int frequency, int milliseconds); 31 | 32 | /*Plays a note using a char array to type note*/ 33 | void playNote(char *note, int milliseconds); 34 | 35 | /*Songs and tunes*/ 36 | //~ void song_pacman(int tempo); 37 | void song_pacman(); //pacman tune 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/std_fs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * std_fs.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef STD_FS_H 25 | #define STD_FS_H 26 | 27 | #include 28 | 29 | //for the file descriptor 30 | #define FDESC_CLEAR 0b1000 31 | #define FDESC_READ 0b100 32 | #define FDESC_WRITE 0b10 33 | #define FDESC_APPEND 0b1 34 | 35 | //define the magic numbers for the file systems 36 | #define M_UNKNOWN 0 37 | #define M_VFS 1 38 | #define M_EXT2 2 39 | 40 | ///node type values 41 | enum 42 | { 43 | TYPE_UNKOWN, 44 | TYPE_FILE, 45 | TYPE_DIRECTORY, 46 | TYPE_CHARD_DEV, 47 | TYPE_BLOCK_DEV, 48 | TYPE_FIFO, 49 | TYPE_SOCKET, 50 | TYPE_SYMLINK, 51 | TYPE_HARDLINK, 52 | TYPE_MOUNTPOINT 53 | }; 54 | 55 | /*for the file desctptor*/ 56 | typedef struct file_desc 57 | { 58 | char *name; 59 | u32int name_len; 60 | void *node; 61 | u32int fs_type; //is it VFS, EXT2, etc. 62 | u32int node_type; //is it a file, directory, ect. 63 | u8int permisions; 64 | s8int inode; 65 | u32int size; 66 | 67 | //callback operations 68 | //~ u32int (*_close)(void*); 69 | u32int (*_read)(void*, u32int, u32int, u8int*); 70 | u32int (*_write)(void*, u32int, u32int, u8int*); 71 | u32int (*_finddir)(void*, char*); 72 | u32int (*_readdir)(void*, u32int); 73 | 74 | //pointing to the next structure of the list 75 | struct file_desc *next; 76 | } file_desc_t; 77 | 78 | //create the typedef for a FILE 79 | typedef file_desc_t FILE; 80 | 81 | typedef struct generic_dirent 82 | { 83 | s32int ino; //inode number. Required by POSIX. -1 if no inode is present 84 | u16int rec_len; //bytes from begining of this dirent to end of this dirent, size of file 85 | u8int name_len; //the number of bytes of charachters in the name 86 | u8int file_type; //a flag that states what type of file this dirent is (ie: a file, pipe, directory, etc.) 87 | char *name; //filename, remember to kmalloc this to give it an address, or else it will page fault 88 | } generic_dirent_t; 89 | 90 | //set the initial file desctripter to be globally gloabal :) 91 | extern file_desc_t *initial_fdesc; 92 | extern char *path; //path name of the directories 93 | extern void *ptr_currentDir; //pointer to the current directory 94 | extern file_desc_t *initial_fdesc; //initial file descriptor location 95 | 96 | /*read information from any supported file system node*/ 97 | u32int f_read(FILE *node, u32int offset, u32int size, u8int *buffer); 98 | 99 | /*write information to any supported file system node*/ 100 | u32int f_write(FILE *node, u32int offset, u32int size, u8int *buffer); 101 | 102 | /*open a file to be ready readding or writing*/ 103 | FILE *f_open(char *filename, void *dir, char *mask); 104 | 105 | /*close an opened file*/ 106 | u32int f_close(FILE *file); 107 | 108 | /*get dirent data from a directory's data*/ 109 | generic_dirent_t *f_readdir(void *node, u32int index); 110 | 111 | /*get a node from a directory by name*/ 112 | FILE *f_finddir(void *node, char *name); 113 | 114 | /*returns the type of a node, is it a file, directory, etc.*/ 115 | u32int node_type(void *node); 116 | 117 | /*returns the name of a directory with a given node*/ 118 | char *name_of_dir(void *node); 119 | 120 | /*set the current directory*/ 121 | u32int setCurrentDir(void *directory); 122 | 123 | /*looks up and returns a file descriptor if it exitsts*/ 124 | file_desc_t *look_up_fdesc(void *node); 125 | 126 | /*close file descriptors opened with f_finddir*/ 127 | void f_finddir_close(FILE *node); 128 | 129 | /*retrieve a file descriptor from a node, without adding it the file descriptor list*/ 130 | FILE *__open__(void *node, char *name, char *mask, u8int open); 131 | 132 | /*with a file descriptor, return the block size of its corresponding file system*/ 133 | u32int block_size_of_node(FILE *node); 134 | 135 | /*delete a dirent of a directory*/ 136 | u32int __remove_dirent__(void *dir, FILE *dirent_node); 137 | 138 | /*deletes only a node's data contents*/ 139 | u32int __free_data__(void *dir, FILE *node); 140 | 141 | /*delete a file by freeing its contents and removing its dirent*/ 142 | u32int f_remove(void *dir, FILE *node); 143 | 144 | /*creates a directory*/ 145 | void *f_make_dir(void *dir, char *name); 146 | 147 | /*expands a file in size by a number of bytes*/ 148 | u32int f_expand(FILE *node, u32int expand_sz); 149 | 150 | /*changes a drive to a blk device input*/ 151 | vfs_blkdev_t *switch_to_blkdev(char *device); 152 | 153 | #endif //STD_FS_H 154 | -------------------------------------------------------------------------------- /include/syscall.h: -------------------------------------------------------------------------------- 1 | /* 2 | * syscall.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // syscall.h -- Defines the interface for and structures relating to the syscall dispatch system. 25 | // Based on code from JamesM's kernel development tutorials. 26 | 27 | #ifndef SYSCALL_H 28 | #define SYSCALL_H 29 | 30 | #include 31 | 32 | void initialise_syscalls(); 33 | 34 | #define DECL_SYSCALL0(fn) int syscall_##fn(); 35 | #define DECL_SYSCALL1(fn,p1) int syscall_##fn(p1); 36 | #define DECL_SYSCALL2(fn,p1,p2) int syscall_##fn(p1,p2); 37 | #define DECL_SYSCALL3(fn,p1,p2,p3) int syscall_##fn(p1,p2,p3); 38 | #define DECL_SYSCALL4(fn,p1,p2,p3,p4) int syscall_##fn(p1,p2,p3,p4); 39 | #define DECL_SYSCALL5(fn,p1,p2,p3,p4,p5) int syscall_##fn(p1,p2,p3,p4,p5); 40 | 41 | #define DEFN_SYSCALL0(fn, num) \ 42 | int syscall_##fn() \ 43 | { \ 44 | int a; \ 45 | asm volatile("int $0x80" : "=a" (a) : "0" (num)); \ 46 | return a; \ 47 | } 48 | 49 | #define DEFN_SYSCALL1(fn, num, P1) \ 50 | int syscall_##fn(P1 p1) \ 51 | { \ 52 | int a; \ 53 | asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1)); \ 54 | return a; \ 55 | } 56 | 57 | #define DEFN_SYSCALL2(fn, num, P1, P2) \ 58 | int syscall_##fn(P1 p1, P2 p2) \ 59 | { \ 60 | int a; \ 61 | asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1), "c" ((int)p2)); \ 62 | return a; \ 63 | } 64 | 65 | #define DEFN_SYSCALL3(fn, num, P1, P2, P3) \ 66 | int syscall_##fn(P1 p1, P2 p2, P3 p3) \ 67 | { \ 68 | int a; \ 69 | asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1), "c" ((int)p2), "d"((int)p3)); \ 70 | return a; \ 71 | } 72 | 73 | #define DEFN_SYSCALL4(fn, num, P1, P2, P3, P4) \ 74 | int syscall_##fn(P1 p1, P2 p2, P3 p3, P4 p4) \ 75 | { \ 76 | int a; \ 77 | asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1), "c" ((int)p2), "d" ((int)p3), "S" ((int)p4)); \ 78 | return a; \ 79 | } 80 | 81 | #define DEFN_SYSCALL5(fn, num) \ 82 | int syscall_##fn(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) \ 83 | { \ 84 | int a; \ 85 | asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1), "c" ((int)p2), "d" ((int)p3), "S" ((int)p4), "D" ((int)p5)); \ 86 | return a; \ 87 | } 88 | 89 | DECL_SYSCALL1(monitor_write, const char*) 90 | DECL_SYSCALL1(monitor_write_hex, const char*) 91 | DECL_SYSCALL1(monitor_write_dec, const char*) 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /include/system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * system.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | 25 | //#ifndef SYSTEM_H 26 | //#define SYSTEM_H 27 | 28 | /////MAY BE USEFUL 29 | ///*ls function that prints all header files formated to #include <__name__> 30 | //* ls -1 *.h | sed 's/^/#include /' 31 | //* 32 | //*the alphabet, may be useful in ordering the headers 33 | //* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z */ 34 | /////MAY BE USEFUL 35 | 36 | //All of the include for this OS 37 | #include "arch/common.h" 38 | #include "arch/cpu.h" 39 | #include "crypt.h" 40 | #include "arch/descriptor_tables.h" 41 | #include "elf.h" 42 | #include "ext2_fs.h" 43 | #include "drivers/fdc.h" 44 | #include "gui/graphics.h" 45 | #include "initrd.h" 46 | #include "arch/isr.h" 47 | #include "keyboard.h" 48 | #include "arch/kheap.h" 49 | #include "math/k_math.h" 50 | #include "k_programs.h" 51 | #include "k_shell.h" 52 | #include "k_stdio.h" 53 | #include "mouse.h" 54 | #include "multiboot.h" 55 | #include "ordered_array.h" 56 | #include "arch/paging.h" 57 | #include "schedule.h" 58 | #include "sound.h" 59 | #include "std_fs.h" 60 | #include "syscall.h" 61 | #include "arch/task.h" 62 | #include "arch/timer.h" 63 | #include "system/version.h" 64 | #include "drivers/vesa.h" 65 | #include "vfs.h" 66 | #include "gui/x_server.h" 67 | 68 | 69 | //#endif //SYSTEM_H 70 | -------------------------------------------------------------------------------- /include/system/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * version.h 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | #ifndef VERSION_H 25 | #define VERSION_H 26 | 27 | //OS information 28 | #define OS_VERSION "0.0.2b (testing)" 29 | #define OS_NAME "JS-OS" 30 | #define OS_BUILD_DATE __DATE__ 31 | #define OS_BUILD_TIME __TIME__ 32 | 33 | //Developer information 34 | #define OS_MAIN_DEV "John Smith" 35 | #define OS_CONTACT "jsmithcontact@tormail.org" 36 | #define OS_DONATE "1D5pnma7E1CP6cquHujycVy79EyXJ3eYEs" 37 | 38 | //License information 39 | #define OS_LICENCE_FILE "LICENSE" 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /initrd/dynamic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/initrd/dynamic -------------------------------------------------------------------------------- /initrd/elf_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/initrd/elf_test -------------------------------------------------------------------------------- /initrd/elf_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * elf_test.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | //this file is used for testing elf binary execution 25 | int main(void) 26 | { 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /initrd/initrd.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/initrd/initrd.img -------------------------------------------------------------------------------- /initrd/make_initrd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/initrd/make_initrd -------------------------------------------------------------------------------- /initrd/make_initrd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * make_initrd.c 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | // Based on code from JamesM's kernel development tutorials. 25 | 26 | #include 27 | 28 | #define NUMBER_OF_HEADERS 64 29 | 30 | struct initrd_header 31 | { 32 | unsigned char magic; 33 | char name[128]; 34 | unsigned int offset; 35 | unsigned int length; 36 | }; 37 | 38 | int main(char argc, char **argv) 39 | { 40 | //get the number of files user wants to have in initrd 41 | int nheaders = (argc - 1) / 2; 42 | struct initrd_header headers[NUMBER_OF_HEADERS]; 43 | printf("size of header: %d\n", sizeof(struct initrd_header)); 44 | 45 | //offset = NUMBER_OF_HEADERS structs of the initrd_header + the one integer that tells the number of headers 46 | unsigned int off = sizeof(struct initrd_header) * NUMBER_OF_HEADERS + sizeof(int); 47 | 48 | int i; 49 | for(i = 0; i < nheaders; i++) 50 | { 51 | printf("writing file %s->%s at 0x%x\n", argv[i*2+1], argv[i*2+2], off); 52 | strcpy(headers[i].name, argv[i*2+2]); 53 | 54 | //add terminating 0 to name of file 55 | headers[i].name[strlen(argv[i*2+2])] = 0; 56 | 57 | //write the offset 58 | headers[i].offset = off; 59 | FILE *stream = fopen(argv[i*2+1], "r"); 60 | if(stream == 0) 61 | { 62 | printf("Error: file not found: %s\n", argv[i*2+1]); 63 | return 1; 64 | } 65 | 66 | //finds the length of the file and saves it to headers[i].length 67 | fseek(stream, 0, SEEK_END); 68 | headers[i].length = ftell(stream); 69 | //finds the length of the file and saves it to headers[i].length 70 | 71 | off += headers[i].length; 72 | fclose(stream); 73 | headers[i].magic = 0xBF; 74 | } 75 | 76 | FILE *wstream = fopen("./initrd.img", "w"); 77 | //~ unsigned char *data = (unsigned char *)malloc(off); 78 | 79 | //write the nheaders to the first sizeof(int) of the initrd.img file 80 | fwrite(&nheaders, sizeof(int), 1, wstream); 81 | 82 | //write the header information after the nheaders integer ini intird.img 83 | fwrite(headers, sizeof(struct initrd_header), NUMBER_OF_HEADERS, wstream); 84 | 85 | for(i = 0; i < nheaders; i++) 86 | { 87 | FILE *stream = fopen(argv[i*2+1], "r"); 88 | 89 | //create a FILE buffer in the memory that will store the data of stream 90 | unsigned char *buf = (unsigned char *)malloc(headers[i].length); 91 | 92 | //write the contents of stream to out FILE buffer 93 | fread(buf, 1, headers[i].length, stream); 94 | 95 | //write that data in the FILE buffer to wstream 96 | fwrite(buf, 1, headers[i].length, wstream); 97 | 98 | fclose(stream); 99 | free(buf); 100 | } 101 | 102 | fclose(wstream); 103 | //~ free(data); 104 | 105 | return 0; 106 | } 107 | -------------------------------------------------------------------------------- /initrd/test.txt: -------------------------------------------------------------------------------- 1 | Hello, VFS world! 2 | Who is the winner? -------------------------------------------------------------------------------- /initrd/test2.txt: -------------------------------------------------------------------------------- 1 | My filename is test2.txt! -------------------------------------------------------------------------------- /initrd/testbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/initrd/testbin -------------------------------------------------------------------------------- /kernel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/kernel -------------------------------------------------------------------------------- /kernel.sym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/kernel.sym -------------------------------------------------------------------------------- /link.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * link.ld 3 | * 4 | * Copyright 2013 JS-OS 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301, USA. 20 | * 21 | * 22 | */ 23 | 24 | 25 | /* Link.ld -- Linker script for the kernel - ensure everything goes in the */ 26 | /* Correct place. */ 27 | /* Based on code from Bran's Kernel Development */ 28 | /* tutorials: http://www.osdever.net/bkerndev/index.php. */ 29 | /* Based on code from JamesM's kernel development tutorials. */ 30 | 31 | 32 | ENTRY(start) 33 | SECTIONS 34 | { 35 | 36 | . = 0x00100000; 37 | 38 | .__mbHeader : { 39 | *(.__mbHeader) 40 | } 41 | 42 | .text : 43 | { 44 | code = .; _code = .; __code = .; 45 | *(.text) 46 | . = ALIGN(4096); 47 | } 48 | 49 | .data : 50 | { 51 | data = .; _data = .; __data = .; 52 | *(.data) 53 | *(.rodata) 54 | . = ALIGN(4096); 55 | } 56 | 57 | .bss : 58 | { 59 | bss = .; _bss = .; __bss = .; 60 | *(.bss) 61 | . = ALIGN(4096); 62 | } 63 | 64 | end = .; _end = .; __end = .; 65 | } 66 | -------------------------------------------------------------------------------- /object_files/c/common.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/common.o -------------------------------------------------------------------------------- /object_files/c/cpu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/cpu.o -------------------------------------------------------------------------------- /object_files/c/crypt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/crypt.o -------------------------------------------------------------------------------- /object_files/c/descriptor_tables.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/descriptor_tables.o -------------------------------------------------------------------------------- /object_files/c/elf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/elf.o -------------------------------------------------------------------------------- /object_files/c/ext2_fs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/ext2_fs.o -------------------------------------------------------------------------------- /object_files/c/fdc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/fdc.o -------------------------------------------------------------------------------- /object_files/c/graphics.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/graphics.o -------------------------------------------------------------------------------- /object_files/c/initrd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/initrd.o -------------------------------------------------------------------------------- /object_files/c/isr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/isr.o -------------------------------------------------------------------------------- /object_files/c/k_math.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/k_math.o -------------------------------------------------------------------------------- /object_files/c/k_programs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/k_programs.o -------------------------------------------------------------------------------- /object_files/c/k_shell.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/k_shell.o -------------------------------------------------------------------------------- /object_files/c/k_stdio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/k_stdio.o -------------------------------------------------------------------------------- /object_files/c/keyboard.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/keyboard.o -------------------------------------------------------------------------------- /object_files/c/kheap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/kheap.o -------------------------------------------------------------------------------- /object_files/c/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/main.o -------------------------------------------------------------------------------- /object_files/c/mouse.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/mouse.o -------------------------------------------------------------------------------- /object_files/c/ordered_array.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/ordered_array.o -------------------------------------------------------------------------------- /object_files/c/paging.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/paging.o -------------------------------------------------------------------------------- /object_files/c/schedule.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/schedule.o -------------------------------------------------------------------------------- /object_files/c/sound.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/sound.o -------------------------------------------------------------------------------- /object_files/c/std_fs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/std_fs.o -------------------------------------------------------------------------------- /object_files/c/syscall.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/syscall.o -------------------------------------------------------------------------------- /object_files/c/task.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/task.o -------------------------------------------------------------------------------- /object_files/c/timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/timer.o -------------------------------------------------------------------------------- /object_files/c/vesa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/vesa.o -------------------------------------------------------------------------------- /object_files/c/vfs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/vfs.o -------------------------------------------------------------------------------- /object_files/c/x_server.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/c/x_server.o -------------------------------------------------------------------------------- /object_files/nasm/boot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/nasm/boot.o -------------------------------------------------------------------------------- /object_files/nasm/gdt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/nasm/gdt.o -------------------------------------------------------------------------------- /object_files/nasm/interrupt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/nasm/interrupt.o -------------------------------------------------------------------------------- /object_files/nasm/process.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/nasm/process.o -------------------------------------------------------------------------------- /object_files/nasm/v86.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/object_files/nasm/v86.o -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | # run.sh 2 | # 3 | # Copyright 2013 JS-OS 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | # MA 02110-1301, USA. 19 | # 20 | # 21 | 22 | ####**********Runs floppy.img in qemu**********#### 23 | 24 | floppy_image="floppy.img" 25 | storage_image="storage.img" 26 | 27 | qemu-system-x86_64 -vga std -soundhw pcspk -fda "$floppy_image" -fdb "$storage_image" 28 | -------------------------------------------------------------------------------- /screenshots/command_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/command_list.png -------------------------------------------------------------------------------- /screenshots/filesystem_in_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/filesystem_in_action.png -------------------------------------------------------------------------------- /screenshots/pong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/pong.png -------------------------------------------------------------------------------- /screenshots/start_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/start_up.png -------------------------------------------------------------------------------- /screenshots/tinytext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/tinytext.png -------------------------------------------------------------------------------- /screenshots/window_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/screenshots/window_manager.png -------------------------------------------------------------------------------- /storage.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DamianB-BitFlipper/JS-OS/6b118bdb0de26f569ea993d2cab7473894ae5683/storage.img -------------------------------------------------------------------------------- /update_image.sh: -------------------------------------------------------------------------------- 1 | # update_image.sh 2 | # 3 | # Copyright 2013 JS-OS 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | # MA 02110-1301, USA. 19 | # 20 | # 21 | 22 | ####**********Takes the kernel image and the initrd.img and builds the 23 | ####**********floppy.img 24 | 25 | #!/bin/bash 26 | 27 | sudo /sbin/losetup /dev/loop1 floppy.img 28 | sudo mount /dev/loop1 /mnt 29 | sudo cp kernel /mnt/kernel 30 | sudo cp ./initrd/initrd.img /mnt/initrd 31 | sudo umount /dev/loop1 32 | sudo /sbin/losetup -d /dev/loop1 33 | -------------------------------------------------------------------------------- /usb_make.sh: -------------------------------------------------------------------------------- 1 | # usb_make.sh 2 | # 3 | # Copyright 2013 JS-OS 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | # MA 02110-1301, USA. 19 | # 20 | # 21 | 22 | #!/bin/bash 23 | 24 | #check the first argument 25 | 26 | GRUB_LOCATION="/grub-boot" 27 | KERNEL="kernel" 28 | INITRD="./initrd/initrd.img" 29 | 30 | case "$1" in 31 | 32 | #user has input drive path 33 | -d) 34 | if [ -d "$2" ] #test if arg 2 directory exists 35 | then 36 | #remove any /boot directory on the usb, if it exits 37 | if [ -d "$2/boot/" ] 38 | then 39 | rm -rf $2/boot/ 40 | fi 41 | 42 | #copy grub 43 | cp -r ./$GRUB_LOCATION/* "$2" 44 | #copy the kernel and initrd 45 | cp $KERNEL $2/boot 46 | cp $INITRD $2/boot 47 | else 48 | echo "$2 not found or is not a directory" 49 | fi;; 50 | 51 | #user wants to print the contents of /media/ 52 | -p) 53 | ls /media/;; 54 | #user wants to print the license information 55 | -l) 56 | printf "Consult the file LICENCE in the directory ./README for more information\n";; 57 | 58 | #user wants help 59 | -h) 60 | printf "Usage:\n\t-d (e.g., -d /media/)\n" 61 | printf "\t-p prints the files in /media/ for convenience\n" 62 | printf "\t-l prints the license information for the use of this script\n" 63 | printf "\t-h prints this help\n";; 64 | 65 | esac 66 | --------------------------------------------------------------------------------