├── .gitignore ├── README.md ├── SanderOSUSB.0 ├── boot ├── grub │ ├── fonts │ │ └── unicode.pf2 │ ├── grub.cfg │ ├── grubenv │ ├── i386-pc │ │ ├── 915resolution.mod │ │ ├── acpi.mod │ │ ├── adler32.mod │ │ ├── affs.mod │ │ ├── afs.mod │ │ ├── ahci.mod │ │ ├── all_video.mod │ │ ├── aout.mod │ │ ├── archelp.mod │ │ ├── at_keyboard.mod │ │ ├── ata.mod │ │ ├── backtrace.mod │ │ ├── bfs.mod │ │ ├── biosdisk.mod │ │ ├── bitmap.mod │ │ ├── bitmap_scale.mod │ │ ├── blocklist.mod │ │ ├── boot.img │ │ ├── boot.mod │ │ ├── bsd.mod │ │ ├── bswap_test.mod │ │ ├── btrfs.mod │ │ ├── bufio.mod │ │ ├── cat.mod │ │ ├── cbfs.mod │ │ ├── cbls.mod │ │ ├── cbmemc.mod │ │ ├── cbtable.mod │ │ ├── cbtime.mod │ │ ├── chain.mod │ │ ├── cmdline_cat_test.mod │ │ ├── cmosdump.mod │ │ ├── cmostest.mod │ │ ├── cmp.mod │ │ ├── cmp_test.mod │ │ ├── command.lst │ │ ├── configfile.mod │ │ ├── core.img │ │ ├── cpio.mod │ │ ├── cpio_be.mod │ │ ├── cpuid.mod │ │ ├── crc64.mod │ │ ├── crypto.lst │ │ ├── crypto.mod │ │ ├── cryptodisk.mod │ │ ├── cs5536.mod │ │ ├── ctz_test.mod │ │ ├── date.mod │ │ ├── datehook.mod │ │ ├── datetime.mod │ │ ├── disk.mod │ │ ├── diskfilter.mod │ │ ├── div.mod │ │ ├── div_test.mod │ │ ├── dm_nv.mod │ │ ├── drivemap.mod │ │ ├── echo.mod │ │ ├── efiemu.mod │ │ ├── efiemu32.o │ │ ├── efiemu64.o │ │ ├── ehci.mod │ │ ├── elf.mod │ │ ├── eval.mod │ │ ├── exfat.mod │ │ ├── exfctest.mod │ │ ├── ext2.mod │ │ ├── extcmd.mod │ │ ├── fat.mod │ │ ├── file.mod │ │ ├── font.mod │ │ ├── freedos.mod │ │ ├── fs.lst │ │ ├── fshelp.mod │ │ ├── functional_test.mod │ │ ├── gcry_arcfour.mod │ │ ├── gcry_blowfish.mod │ │ ├── gcry_camellia.mod │ │ ├── gcry_cast5.mod │ │ ├── gcry_crc.mod │ │ ├── gcry_des.mod │ │ ├── gcry_dsa.mod │ │ ├── gcry_idea.mod │ │ ├── gcry_md4.mod │ │ ├── gcry_md5.mod │ │ ├── gcry_rfc2268.mod │ │ ├── gcry_rijndael.mod │ │ ├── gcry_rmd160.mod │ │ ├── gcry_rsa.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 │ │ ├── gdb.mod │ │ ├── geli.mod │ │ ├── gettext.mod │ │ ├── gfxmenu.mod │ │ ├── gfxterm.mod │ │ ├── gfxterm_background.mod │ │ ├── gfxterm_menu.mod │ │ ├── gptsync.mod │ │ ├── gzio.mod │ │ ├── halt.mod │ │ ├── hashsum.mod │ │ ├── hdparm.mod │ │ ├── hello.mod │ │ ├── help.mod │ │ ├── hexdump.mod │ │ ├── hfs.mod │ │ ├── hfsplus.mod │ │ ├── hfspluscomp.mod │ │ ├── http.mod │ │ ├── hwmatch.mod │ │ ├── iorw.mod │ │ ├── iso9660.mod │ │ ├── jfs.mod │ │ ├── jpeg.mod │ │ ├── keylayouts.mod │ │ ├── keystatus.mod │ │ ├── ldm.mod │ │ ├── legacy_password_test.mod │ │ ├── legacycfg.mod │ │ ├── linux.mod │ │ ├── linux16.mod │ │ ├── loadenv.mod │ │ ├── loopback.mod │ │ ├── ls.mod │ │ ├── lsacpi.mod │ │ ├── lsapm.mod │ │ ├── lsmmap.mod │ │ ├── lspci.mod │ │ ├── luks.mod │ │ ├── lvm.mod │ │ ├── lzopio.mod │ │ ├── macbless.mod │ │ ├── macho.mod │ │ ├── mda_text.mod │ │ ├── mdraid09.mod │ │ ├── mdraid09_be.mod │ │ ├── mdraid1x.mod │ │ ├── memdisk.mod │ │ ├── memrw.mod │ │ ├── minicmd.mod │ │ ├── minix.mod │ │ ├── minix2.mod │ │ ├── minix2_be.mod │ │ ├── minix3.mod │ │ ├── minix3_be.mod │ │ ├── minix_be.mod │ │ ├── mmap.mod │ │ ├── moddep.lst │ │ ├── modinfo.sh │ │ ├── morse.mod │ │ ├── mpi.mod │ │ ├── msdospart.mod │ │ ├── mul_test.mod │ │ ├── multiboot.mod │ │ ├── multiboot2.mod │ │ ├── nativedisk.mod │ │ ├── net.mod │ │ ├── newc.mod │ │ ├── nilfs2.mod │ │ ├── normal.mod │ │ ├── ntfs.mod │ │ ├── ntfscomp.mod │ │ ├── ntldr.mod │ │ ├── odc.mod │ │ ├── offsetio.mod │ │ ├── ohci.mod │ │ ├── part_acorn.mod │ │ ├── part_amiga.mod │ │ ├── part_apple.mod │ │ ├── part_bsd.mod │ │ ├── part_dfly.mod │ │ ├── part_dvh.mod │ │ ├── part_gpt.mod │ │ ├── part_msdos.mod │ │ ├── part_plan.mod │ │ ├── part_sun.mod │ │ ├── part_sunpc.mod │ │ ├── partmap.lst │ │ ├── parttool.lst │ │ ├── parttool.mod │ │ ├── password.mod │ │ ├── password_pbkdf2.mod │ │ ├── pata.mod │ │ ├── pbkdf2.mod │ │ ├── pbkdf2_test.mod │ │ ├── pci.mod │ │ ├── pcidump.mod │ │ ├── plan9.mod │ │ ├── play.mod │ │ ├── png.mod │ │ ├── priority_queue.mod │ │ ├── probe.mod │ │ ├── procfs.mod │ │ ├── progress.mod │ │ ├── pxe.mod │ │ ├── pxechain.mod │ │ ├── raid5rec.mod │ │ ├── raid6rec.mod │ │ ├── random.mod │ │ ├── read.mod │ │ ├── reboot.mod │ │ ├── regexp.mod │ │ ├── reiserfs.mod │ │ ├── relocator.mod │ │ ├── romfs.mod │ │ ├── scsi.mod │ │ ├── search.mod │ │ ├── search_fs_file.mod │ │ ├── search_fs_uuid.mod │ │ ├── search_label.mod │ │ ├── sendkey.mod │ │ ├── serial.mod │ │ ├── setjmp.mod │ │ ├── setjmp_test.mod │ │ ├── setpci.mod │ │ ├── sfs.mod │ │ ├── shift_test.mod │ │ ├── signature_test.mod │ │ ├── sleep.mod │ │ ├── sleep_test.mod │ │ ├── spkmodem.mod │ │ ├── squash4.mod │ │ ├── syslinuxcfg.mod │ │ ├── tar.mod │ │ ├── terminal.lst │ │ ├── terminal.mod │ │ ├── terminfo.mod │ │ ├── test.mod │ │ ├── test_blockarg.mod │ │ ├── testload.mod │ │ ├── testspeed.mod │ │ ├── tftp.mod │ │ ├── tga.mod │ │ ├── time.mod │ │ ├── tr.mod │ │ ├── trig.mod │ │ ├── true.mod │ │ ├── truecrypt.mod │ │ ├── udf.mod │ │ ├── ufs1.mod │ │ ├── ufs1_be.mod │ │ ├── ufs2.mod │ │ ├── uhci.mod │ │ ├── usb.mod │ │ ├── usb_keyboard.mod │ │ ├── usbms.mod │ │ ├── usbserial_common.mod │ │ ├── usbserial_ftdi.mod │ │ ├── usbserial_pl2303.mod │ │ ├── usbserial_usbdebug.mod │ │ ├── usbtest.mod │ │ ├── vbe.mod │ │ ├── verify.mod │ │ ├── vga.mod │ │ ├── vga_text.mod │ │ ├── video.lst │ │ ├── video.mod │ │ ├── video_bochs.mod │ │ ├── video_cirrus.mod │ │ ├── video_colors.mod │ │ ├── video_fb.mod │ │ ├── videoinfo.mod │ │ ├── videotest.mod │ │ ├── videotest_checksum.mod │ │ ├── xfs.mod │ │ ├── xnu.mod │ │ ├── xnu_uuid.mod │ │ ├── xnu_uuid_test.mod │ │ ├── xzio.mod │ │ ├── zfs.mod │ │ ├── zfscrypt.mod │ │ └── zfsinfo.mod │ └── locale │ │ ├── en@quot.mo │ │ ├── en_AU.mo │ │ ├── en_CA.mo │ │ ├── en_GB.mo │ │ └── nl.mo └── pxe │ ├── pxe_entry_point.asm │ ├── pxeentry.bin │ └── pxestub.bin ├── cdrom.iso ├── example.bin ├── fasm ├── include ├── SanderOSUSB.h ├── assert.h ├── ctype.h ├── math.h ├── memory.h ├── network.h ├── stddef.h ├── stdio.h ├── stdlib.h ├── string.h ├── symbols.h └── sys │ └── cdefs.h ├── kernel.bin ├── kernel ├── README.md ├── build.sh ├── dev │ ├── AHCI.c │ ├── RTL8169.c │ ├── acpi.c │ ├── cmos.c │ ├── com_port.c │ ├── cpuid.c │ ├── device.c │ ├── e1000.c │ ├── ehci.c │ ├── ethernet.c │ ├── ide.c │ ├── math.c │ ├── memory.c │ ├── pci.c │ ├── ps2.c │ ├── soundblaster16.c │ ├── terminal.c │ ├── timer.c │ ├── uhci.c │ ├── usb.c │ ├── usb_hid.c │ ├── usb_stick.c │ ├── vbox.c │ ├── video.c │ └── xhci.c ├── exec │ ├── elf.c │ ├── program.c │ └── program.h ├── fs │ ├── ext.c │ ├── fat.c │ ├── iso9660.c │ ├── mbr.c │ ├── sfs.c │ └── tftp.c ├── hal │ └── i386 │ │ ├── interrupts.c │ │ ├── io_ports.c │ │ ├── isr.asm │ │ ├── multitasking.c │ │ ├── paging.asm │ │ ├── paging.c │ │ └── video.asm ├── kernel.c ├── kernel.h ├── linker.ld ├── myos.bin ├── status.h ├── stdarg.h └── stub │ └── i386 │ └── grub │ └── boot.asm ├── lib ├── libsos.a ├── linker.ld ├── modern.c ├── modern.o ├── stub.inc ├── stub.o ├── user32.inc └── user32.o ├── programs ├── assembler.bin ├── base.as ├── basic.bin ├── basic │ ├── basic │ ├── basic.c │ ├── basic.o │ ├── build.sh │ ├── linker.ld │ ├── startup.asm │ └── startup.o ├── chat.bin ├── chat │ ├── build.sh │ ├── chat │ ├── chat.c │ └── chat.o ├── compiler.bin ├── dragoncompiler │ ├── SanderOSUSBMakefile │ ├── build.sh │ ├── linker.ld │ ├── makefilebackup │ ├── stub.asm │ └── stub.o ├── example.bin ├── example.c ├── fasm │ ├── build.sh │ ├── examples │ │ ├── elfexe │ │ │ ├── dynamic │ │ │ │ ├── elf.inc │ │ │ │ ├── hello │ │ │ │ ├── hello.asm │ │ │ │ ├── hello64 │ │ │ │ ├── hello64.asm │ │ │ │ ├── import32.inc │ │ │ │ ├── import64.inc │ │ │ │ └── proc32.inc │ │ │ ├── hello │ │ │ ├── hello.asm │ │ │ ├── hello64 │ │ │ └── hello64.asm │ │ ├── elfobj │ │ │ ├── msgdemo.asm │ │ │ ├── msgdemo.o │ │ │ ├── writemsg.asm │ │ │ └── writemsg.o │ │ └── libcdemo │ │ │ ├── ccall.inc │ │ │ ├── libcdemo.asm │ │ │ └── libcdemo.o │ ├── fasm │ ├── fasm.o │ ├── fasm.txt │ ├── fasm.x64 │ ├── license.txt │ ├── readme.txt │ ├── source │ │ ├── DOS │ │ │ ├── dpmi.inc │ │ │ ├── fasm.asm │ │ │ ├── modes.inc │ │ │ └── system.inc │ │ ├── Linux │ │ │ ├── fasm │ │ │ ├── fasm.asm │ │ │ ├── system.inc │ │ │ └── x64 │ │ │ │ ├── fasm.asm │ │ │ │ ├── modes.inc │ │ │ │ └── system.inc │ │ ├── SoS │ │ │ ├── build.sh │ │ │ ├── fasm │ │ │ ├── fasm.asm │ │ │ ├── linker.ld │ │ │ ├── startup.asm │ │ │ └── system.inc │ │ ├── Win32 │ │ │ ├── fasm.asm │ │ │ └── system.inc │ │ ├── assemble.inc │ │ ├── avx.inc │ │ ├── errors.inc │ │ ├── exprcalc.inc │ │ ├── exprpars.inc │ │ ├── formats.inc │ │ ├── libc │ │ │ ├── fasm.asm │ │ │ └── system.inc │ │ ├── messages.inc │ │ ├── parser.inc │ │ ├── preproce.inc │ │ ├── symbdump.inc │ │ ├── tables.inc │ │ ├── variable.inc │ │ ├── version.inc │ │ └── x86_64.inc │ ├── tools │ │ ├── dos │ │ │ ├── listing.asm │ │ │ ├── loader.inc │ │ │ ├── prepsrc.asm │ │ │ ├── symbols.asm │ │ │ └── system.inc │ │ ├── fas.txt │ │ ├── libc │ │ │ ├── ccall.inc │ │ │ ├── listing.asm │ │ │ ├── prepsrc.asm │ │ │ ├── symbols.asm │ │ │ └── system.inc │ │ ├── listing.inc │ │ ├── prepsrc.inc │ │ ├── readme.txt │ │ ├── symbols.inc │ │ └── win32 │ │ │ ├── listing.asm │ │ │ ├── prepsrc.asm │ │ │ ├── symbols.asm │ │ │ └── system.inc │ └── whatsnew.txt ├── irc.bin ├── irc │ ├── build.sh │ ├── irc │ ├── irc.c │ └── irc.o ├── proglinker.ld ├── sedit.bin ├── sedit │ ├── build.sh │ ├── linker.ld │ ├── sedit │ ├── sedit.c │ ├── sedit.o │ ├── startup.asm │ └── startup.o ├── voorbeeld.asm └── voorbeeld.bin ├── symbols └── utils ├── gensymbols └── gensymbols.c /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | buildlink.sh -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SanderOSUSB 2 | 3 | Thank you for showing interest in SanderOSUSB! 4 | SanderOSUSB is a 32bit single tasking monolythic kernel that is supposed to run from USB or cd-rom. 5 | 6 | ## Compiling 7 | For compiling you need the following programs: 8 | - gcc 9 | - nasm or fasm 10 | - xorriso (grub) 11 | 12 | ``` sudo apt install gcc nasm xorriso ``` 13 | 14 | And then run the file ``` /kernel/build.sh [ARGS]``` to generate kernel file 15 | Where: 16 | - empty : only generates a kernel.bin file 17 | - --grub : generates a grub-iso image 18 | - --pxe : generates a pxe image 19 | 20 | ## Runing the OS 21 | - install qemu 22 | 23 | ```sudo apt install qemu qemu-utils qemu-kvm``` 24 | 25 | - go to the repo directory 26 | - run: 27 | 28 | ```qemu-system-x86_64 -cdrom ./cdrom.iso``` 29 | 30 | ## Suported Devices 31 | Currently the following devices are supported: 32 | * :question: unknown 33 | * :x: not supported 34 | * :white_check_mark: works 35 | * :bug: partly working 36 | 37 | Devicename | VirtualBox | Qemu | Bochs | Real hardware 38 | ----------|---------- | ---- | ----- | ------------- 39 | IDE - ATA | :white_check_mark: | :white_check_mark: | :white_check_mark: | :question: 40 | IDE - ATAPI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 41 | AHCI - ATA | :white_check_mark: | :white_check_mark: | :white_check_mark: | :bug: 42 | AHCI - ATAPI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: 43 | PS/2 keyboard | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 44 | PS/2 mouse | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 45 | PIC | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 46 | PCI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 47 | ACPI | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 48 | USB - HID - Keyboard | :white_check_mark: | :white_check_mark: | :white_check_mark: | :question: 49 | USB - Mass Storage Device | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: 50 | EHCI (USB2.0) - Basic support | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 51 | XHCI (USB3.0) - Basic support | :x: | :white_check_mark: | :question: | :bug: 52 | RTL8169 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 53 | E1000 | :white_check_mark: | :question: | :question: | :question: 54 | Soundblaster 16 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: 55 | 56 | The following devices are on the list to get implemented: 57 | 58 | The following filesystems are supported: 59 | 60 | Filesystemname | Read | Write 61 | -------------- | ---- | ----- 62 | ISO 9660 | :white_check_mark: | :x: 63 | MBR | :white_check_mark: | :x: 64 | EFI-MBR | :white_check_mark: | :x: 65 | EXT2 (very basic) | :white_check_mark: | :x: 66 | FAT 12,16,32 | :white_check_mark: | :white_check_mark: 67 | SFS | :white_check_mark: | :white_check_mark: 68 | TFTP | :white_check_mark: | :x: 69 | 70 | the following executable formats are supported: 71 | * 32-ELF (relocation and executable type) 72 | * raw binary at 0x2000 73 | * BASfile (with basic.bin) 74 | 75 | the following executable formats are on the list to get implemented: 76 | * 32-MZPE 77 | * 32-MZCOFF 78 | * Marble 79 | 80 | the following bootmethods are supported: 81 | * GRUB2 82 | * PXE 83 | * qemu --kernel loader 84 | 85 | ## Directories 86 | * boot: Grub bin folder 87 | * kernel: Kernel source code 88 | * lib: kernel static library to which programs attach to 89 | * programs: example programs 90 | 91 | ## Instalation on CDROM 92 | * build system with ``` ./build.sh --grub ``` 93 | * burn cdrom.iso to a cdrom 94 | 95 | ## Instalation on USB 96 | * make a usbstick with EXT as filesystem 97 | * run ``` sudo grub-install --target=i386-pc --root-directory=[mountpoint_filesystem] /dev/sdb ``` 98 | * copy grub command file ``` sudo cp ../boot/grub/grub.cfg [mountpoint_filesystem]/boot/grub/grub.cfg ``` 99 | * copy kernel ``` sudo cp ../kernel.bin /media/sander/SOS/kernel.bin ``` -------------------------------------------------------------------------------- /SanderOSUSB.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/SanderOSUSB.0 -------------------------------------------------------------------------------- /boot/grub/fonts/unicode.pf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/fonts/unicode.pf2 -------------------------------------------------------------------------------- /boot/grub/grub.cfg: -------------------------------------------------------------------------------- 1 | menuentry "Sanderslando Operating System" { 2 | multiboot /kernel.bin 3 | } 4 | 5 | menuentry "Sanderslando Operating System - for usb keyboards" { 6 | multiboot /kernel.bin usb keyboard 7 | } -------------------------------------------------------------------------------- /boot/grub/grubenv: -------------------------------------------------------------------------------- 1 | # GRUB Environment Block 2 | ####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### -------------------------------------------------------------------------------- /boot/grub/i386-pc/915resolution.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/915resolution.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/acpi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/acpi.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/adler32.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/adler32.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/affs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/affs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/afs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/afs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ahci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ahci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/all_video.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/all_video.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/aout.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/aout.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/archelp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/archelp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/at_keyboard.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/at_keyboard.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ata.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ata.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/backtrace.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/backtrace.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/biosdisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/biosdisk.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bitmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bitmap.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bitmap_scale.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bitmap_scale.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/blocklist.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/blocklist.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/boot.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/boot.img -------------------------------------------------------------------------------- /boot/grub/i386-pc/boot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/boot.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bsd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bsd.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bswap_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bswap_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/btrfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/btrfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/bufio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/bufio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cat.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cat.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cbfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cbfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cbls.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cbls.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cbmemc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cbmemc.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cbtable.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cbtable.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cbtime.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cbtime.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/chain.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/chain.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cmdline_cat_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cmdline_cat_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cmosdump.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cmosdump.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cmostest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cmostest.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cmp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cmp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cmp_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cmp_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/configfile.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/configfile.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/core.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/core.img -------------------------------------------------------------------------------- /boot/grub/i386-pc/cpio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cpio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cpio_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cpio_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cpuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cpuid.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/crc64.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/crc64.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/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 | CRC64: crc64 10 | ARCFOUR: gcry_arcfour 11 | BLOWFISH: gcry_blowfish 12 | CAMELLIA128: gcry_camellia 13 | CAMELLIA192: gcry_camellia 14 | CAMELLIA256: gcry_camellia 15 | CAST5: gcry_cast5 16 | CRC32: gcry_crc 17 | CRC32RFC1510: gcry_crc 18 | CRC24RFC2440: gcry_crc 19 | DES: gcry_des 20 | 3DES: gcry_des 21 | DSA: gcry_dsa 22 | IDEA: gcry_idea 23 | MD4: gcry_md4 24 | MD5: gcry_md5 25 | RFC2268_40: gcry_rfc2268 26 | AES: gcry_rijndael 27 | AES192: gcry_rijndael 28 | AES256: gcry_rijndael 29 | RIPEMD160: gcry_rmd160 30 | RSA: gcry_rsa 31 | SEED: gcry_seed 32 | SERPENT128: gcry_serpent 33 | SERPENT192: gcry_serpent 34 | SERPENT256: gcry_serpent 35 | SHA1: gcry_sha1 36 | SHA224: gcry_sha256 37 | SHA256: gcry_sha256 38 | SHA512: gcry_sha512 39 | SHA384: gcry_sha512 40 | TIGER192: gcry_tiger 41 | TIGER: gcry_tiger 42 | TIGER2: gcry_tiger 43 | TWOFISH: gcry_twofish 44 | TWOFISH128: gcry_twofish 45 | WHIRLPOOL: gcry_whirlpool 46 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/crypto.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/crypto.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cryptodisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cryptodisk.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/cs5536.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/cs5536.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ctz_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ctz_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/date.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/date.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/datehook.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/datehook.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/datetime.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/datetime.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/disk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/disk.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/diskfilter.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/diskfilter.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/div.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/div.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/div_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/div_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/dm_nv.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/dm_nv.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/drivemap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/drivemap.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/echo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/echo.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/efiemu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/efiemu.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/efiemu32.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/efiemu32.o -------------------------------------------------------------------------------- /boot/grub/i386-pc/efiemu64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/efiemu64.o -------------------------------------------------------------------------------- /boot/grub/i386-pc/ehci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ehci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/elf.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/elf.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/eval.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/eval.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/exfat.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/exfat.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/exfctest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/exfctest.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ext2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ext2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/extcmd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/extcmd.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/fat.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/fat.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/file.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/file.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/font.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/font.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/freedos.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/freedos.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/fs.lst: -------------------------------------------------------------------------------- 1 | affs 2 | afs 3 | bfs 4 | btrfs 5 | cbfs 6 | cpio 7 | cpio_be 8 | exfat 9 | ext2 10 | fat 11 | hfs 12 | hfsplus 13 | iso9660 14 | jfs 15 | minix 16 | minix2 17 | minix2_be 18 | minix3 19 | minix3_be 20 | minix_be 21 | newc 22 | nilfs2 23 | ntfs 24 | odc 25 | procfs 26 | reiserfs 27 | romfs 28 | sfs 29 | squash4 30 | tar 31 | udf 32 | ufs1 33 | ufs1_be 34 | ufs2 35 | xfs 36 | zfs 37 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/fshelp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/fshelp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/functional_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/functional_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_arcfour.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_arcfour.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_blowfish.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_blowfish.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_camellia.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_camellia.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_cast5.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_cast5.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_crc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_crc.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_des.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_des.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_dsa.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_dsa.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_idea.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_idea.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_md4.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_md4.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_md5.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_md5.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_rfc2268.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_rfc2268.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_rijndael.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_rijndael.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_rmd160.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_rmd160.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_rsa.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_rsa.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_seed.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_seed.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_serpent.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_serpent.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_sha1.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_sha1.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_sha256.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_sha256.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_sha512.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_sha512.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_tiger.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_tiger.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_twofish.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_twofish.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gcry_whirlpool.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gcry_whirlpool.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gdb.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gdb.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/geli.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/geli.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gettext.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gettext.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gfxmenu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gfxmenu.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gfxterm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gfxterm.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gfxterm_background.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gfxterm_background.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gfxterm_menu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gfxterm_menu.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gptsync.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gptsync.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/gzio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/gzio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/halt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/halt.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hashsum.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hashsum.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hdparm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hdparm.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hello.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hello.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/help.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/help.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hexdump.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hexdump.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hfsplus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hfsplus.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hfspluscomp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hfspluscomp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/http.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/http.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/hwmatch.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/hwmatch.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/iorw.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/iorw.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/iso9660.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/iso9660.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/jfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/jfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/jpeg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/jpeg.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/keylayouts.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/keylayouts.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/keystatus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/keystatus.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ldm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ldm.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/legacy_password_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/legacy_password_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/legacycfg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/legacycfg.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/linux.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/linux.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/linux16.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/linux16.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/loadenv.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/loadenv.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/loopback.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/loopback.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ls.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ls.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lsacpi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lsacpi.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lsapm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lsapm.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lsmmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lsmmap.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lspci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lspci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/luks.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/luks.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lvm.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lvm.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/lzopio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/lzopio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/macbless.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/macbless.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/macho.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/macho.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mda_text.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mda_text.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mdraid09.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mdraid09.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mdraid09_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mdraid09_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mdraid1x.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mdraid1x.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/memdisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/memdisk.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/memrw.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/memrw.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minicmd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minicmd.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix2_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix2_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix3.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix3.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix3_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix3_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/minix_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/minix_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mmap.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mmap.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/modinfo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # User-controllable options 4 | grub_modinfo_target_cpu=i386 5 | grub_modinfo_platform=pc 6 | grub_disk_cache_stats=0 7 | grub_boot_time_stats=0 8 | grub_have_font_source=1 9 | 10 | # Autodetected config 11 | grub_have_asm_uscore=0 12 | grub_bss_start_symbol="__bss_start" 13 | grub_end_symbol="end" 14 | 15 | # Build environment 16 | grub_target_cc='gcc-6' 17 | grub_target_cc_version='gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424' 18 | grub_target_cflags=' -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-pie -fno-stack-protector -Wtrampolines -Werror' 19 | grub_target_cppflags='-Wno-unused-but-set-variable -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I$(top_srcdir)/include -I$(top_builddir)/include' 20 | grub_target_ccasflags=' -g -m32 -msoft-float' 21 | grub_target_ldflags='-no-pie -m32 -Wl,-melf_i386 -no-pie -Wl,--build-id=none' 22 | grub_cflags='' 23 | grub_cppflags=' -D_FILE_OFFSET_BITS=64' 24 | grub_ccasflags='' 25 | grub_ldflags='' 26 | grub_target_strip='strip' 27 | grub_target_nm='nm' 28 | grub_target_ranlib='ranlib' 29 | grub_target_objconf='' 30 | grub_target_obj2elf='' 31 | grub_target_img_base_ldopt='-Wl,-Ttext' 32 | grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' 33 | 34 | # Version 35 | grub_version="2.02" 36 | grub_package="grub" 37 | grub_package_string="GRUB 2.02-2ubuntu8.7" 38 | grub_package_version="2.02-2ubuntu8.7" 39 | grub_package_name="GRUB" 40 | grub_package_bugreport="bug-grub@gnu.org" 41 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/morse.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/morse.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mpi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mpi.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/msdospart.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/msdospart.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/mul_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/mul_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/multiboot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/multiboot.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/multiboot2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/multiboot2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/nativedisk.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/nativedisk.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/net.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/net.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/newc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/newc.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/nilfs2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/nilfs2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/normal.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/normal.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ntfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ntfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ntfscomp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ntfscomp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ntldr.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ntldr.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/odc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/odc.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/offsetio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/offsetio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ohci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ohci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_acorn.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_acorn.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_amiga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_amiga.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_apple.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_apple.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_bsd.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_bsd.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_dfly.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_dfly.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_dvh.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_dvh.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_gpt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_gpt.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_msdos.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_msdos.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_plan.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_plan.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_sun.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_sun.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/part_sunpc.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/part_sunpc.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/partmap.lst: -------------------------------------------------------------------------------- 1 | part_acorn 2 | part_amiga 3 | part_apple 4 | part_bsd 5 | part_dfly 6 | part_dvh 7 | part_gpt 8 | part_msdos 9 | part_plan 10 | part_sun 11 | part_sunpc 12 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/parttool.lst: -------------------------------------------------------------------------------- 1 | msdos: msdospart 2 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/parttool.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/parttool.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/password.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/password.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/password_pbkdf2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/password_pbkdf2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pata.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pata.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pbkdf2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pbkdf2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pbkdf2_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pbkdf2_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pcidump.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pcidump.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/plan9.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/plan9.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/play.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/play.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/png.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/png.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/priority_queue.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/priority_queue.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/probe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/probe.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/procfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/procfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/progress.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/progress.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pxe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pxe.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/pxechain.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/pxechain.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/raid5rec.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/raid5rec.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/raid6rec.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/raid6rec.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/random.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/random.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/read.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/read.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/reboot.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/reboot.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/regexp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/regexp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/reiserfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/reiserfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/relocator.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/relocator.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/romfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/romfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/scsi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/scsi.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/search.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/search.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/search_fs_file.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/search_fs_file.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/search_fs_uuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/search_fs_uuid.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/search_label.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/search_label.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/sendkey.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/sendkey.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/serial.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/serial.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/setjmp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/setjmp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/setjmp_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/setjmp_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/setpci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/setpci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/sfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/sfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/shift_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/shift_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/signature_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/signature_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/sleep.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/sleep.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/sleep_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/sleep_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/spkmodem.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/spkmodem.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/squash4.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/squash4.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/syslinuxcfg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/syslinuxcfg.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/tar.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/tar.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/terminal.lst: -------------------------------------------------------------------------------- 1 | iat_keyboard: at_keyboard 2 | iserial: serial 3 | iserial_*: serial 4 | oaudio: morse 5 | ocbmemc: cbmemc 6 | ogfxterm: gfxterm 7 | omda_text: mda_text 8 | oserial: serial 9 | oserial_*: serial 10 | ospkmodem: spkmodem 11 | ovga_text: vga_text 12 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/terminal.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/terminal.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/terminfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/terminfo.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/test_blockarg.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/test_blockarg.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/testload.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/testload.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/testspeed.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/testspeed.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/tftp.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/tftp.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/tga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/tga.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/time.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/time.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/tr.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/tr.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/trig.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/trig.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/true.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/true.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/truecrypt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/truecrypt.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/udf.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/udf.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ufs1.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ufs1.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ufs1_be.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ufs1_be.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/ufs2.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/ufs2.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/uhci.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/uhci.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usb.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usb.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usb_keyboard.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usb_keyboard.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbms.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbms.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbserial_common.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbserial_common.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbserial_ftdi.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbserial_ftdi.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbserial_pl2303.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbserial_pl2303.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbserial_usbdebug.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbserial_usbdebug.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/usbtest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/usbtest.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/vbe.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/vbe.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/verify.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/verify.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/vga.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/vga.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/vga_text.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/vga_text.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/video.lst: -------------------------------------------------------------------------------- 1 | vbe 2 | vga 3 | video_bochs 4 | video_cirrus 5 | -------------------------------------------------------------------------------- /boot/grub/i386-pc/video.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/video.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/video_bochs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/video_bochs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/video_cirrus.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/video_cirrus.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/video_colors.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/video_colors.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/video_fb.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/video_fb.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/videoinfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/videoinfo.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/videotest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/videotest.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/videotest_checksum.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/videotest_checksum.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/xfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/xfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/xnu.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/xnu.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/xnu_uuid.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/xnu_uuid.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/xnu_uuid_test.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/xnu_uuid_test.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/xzio.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/xzio.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/zfs.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/zfs.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/zfscrypt.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/zfscrypt.mod -------------------------------------------------------------------------------- /boot/grub/i386-pc/zfsinfo.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/i386-pc/zfsinfo.mod -------------------------------------------------------------------------------- /boot/grub/locale/en@quot.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/locale/en@quot.mo -------------------------------------------------------------------------------- /boot/grub/locale/en_AU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/locale/en_AU.mo -------------------------------------------------------------------------------- /boot/grub/locale/en_CA.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/locale/en_CA.mo -------------------------------------------------------------------------------- /boot/grub/locale/en_GB.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/locale/en_GB.mo -------------------------------------------------------------------------------- /boot/grub/locale/nl.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/grub/locale/nl.mo -------------------------------------------------------------------------------- /boot/pxe/pxeentry.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/pxe/pxeentry.bin -------------------------------------------------------------------------------- /boot/pxe/pxestub.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/boot/pxe/pxestub.bin -------------------------------------------------------------------------------- /cdrom.iso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/cdrom.iso -------------------------------------------------------------------------------- /example.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/example.bin -------------------------------------------------------------------------------- /fasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/fasm -------------------------------------------------------------------------------- /include/SanderOSUSB.h: -------------------------------------------------------------------------------- 1 | #define STDIO 1 2 | 3 | #ifndef NULL 4 | #define NULL 0 5 | #endif 6 | 7 | #ifndef D_EXIT 8 | #define D_EXIT 9 | void exit (void){ 10 | int mode = 1; 11 | __asm__ __volatile__ ( 12 | "int $0x80" 13 | : "+a" (mode) 14 | ); 15 | } 16 | #endif 17 | 18 | void print(const char* message,int to){ 19 | int mode = 4; 20 | int len = 0; 21 | while(message[len++]!=NULL); 22 | __asm__ __volatile__ ( 23 | "int $0x80" 24 | : "+a" (mode) 25 | , "+b" (to) 26 | , "+c" (message) 27 | , "+d" (len) 28 | ); 29 | } 30 | 31 | void read(int to,char *message,int len){ 32 | int mode = 3; 33 | __asm__ __volatile__ ( 34 | "int $0x80" 35 | : "+a" (mode) 36 | , "+b" (to) 37 | , "+c" (message) 38 | , "+d" (len) 39 | ); 40 | } 41 | 42 | int open(const char *pathname, int flags, int mode){ 43 | int model = 5; 44 | int res = 0; 45 | __asm__ __volatile__ ( 46 | "int $0x80" 47 | : "+a" (model) 48 | , "+b" (pathname) 49 | , "+c" (flags) 50 | , "+d" (mode) 51 | : 52 | "r" (res) 53 | ); 54 | return res; 55 | } 56 | 57 | void printf(const char* msg,...){ 58 | void* (*foo)(const char*,...) = (void*) 0x100012; 59 | foo(msg); 60 | } 61 | -------------------------------------------------------------------------------- /include/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef D_assert 2 | #define D_assert 3 | #define assert(expr)((void) (0)) 4 | typedef signed int off_t; 5 | #endif -------------------------------------------------------------------------------- /include/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef D_isdigit 2 | #define D_isdigit 3 | int isdigit(int c); 4 | int toupper(int c); 5 | int tolower(int c); 6 | int isalnum(int c); 7 | int isalpha(int c); 8 | int isascii(int c); 9 | int isblank(int c); 10 | int iscntrl(int c); 11 | int isdigit(int c); 12 | int isgraph(int c); 13 | int islower(int c); 14 | int isprint(int c); 15 | int ispunct(int c); 16 | int isspace(int c); 17 | int isupper(int c); 18 | int isxdigit(int c); 19 | #endif -------------------------------------------------------------------------------- /include/math.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/include/math.h -------------------------------------------------------------------------------- /include/memory.h: -------------------------------------------------------------------------------- 1 | #include "string.h" -------------------------------------------------------------------------------- /include/network.h: -------------------------------------------------------------------------------- 1 | 2 | #define SIZE_OF_MAC 6 3 | #define SIZE_OF_IP 4 4 | #define ETHERNET_TYPE_ARP 0x0608 5 | #define ETHERNET_TYPE_IP4 0x0008 6 | 7 | struct EthernetHeader{ 8 | unsigned char to[SIZE_OF_MAC]; 9 | unsigned char from[SIZE_OF_MAC]; 10 | unsigned short type; 11 | } __attribute__ ((packed)); 12 | 13 | struct ARPHeader{ 14 | struct EthernetHeader ethernetheader; 15 | unsigned short hardware_type; 16 | unsigned short protocol_type; 17 | unsigned char hardware_address_length; 18 | unsigned char protocol_address_length; 19 | unsigned short operation; 20 | 21 | unsigned char source_mac[SIZE_OF_MAC]; 22 | unsigned char source_ip[SIZE_OF_IP]; 23 | 24 | unsigned char dest_mac[SIZE_OF_MAC]; 25 | unsigned char dest_ip[SIZE_OF_IP]; 26 | } __attribute__ ((packed)); 27 | 28 | struct IPv4Header{ 29 | struct EthernetHeader ethernetheader; 30 | unsigned char internet_header_length:4; 31 | unsigned char version:4; 32 | unsigned char type_of_service; 33 | unsigned short total_length; 34 | unsigned short id; 35 | unsigned short flags:3; 36 | unsigned short fragment_offset:13; 37 | unsigned char time_to_live; 38 | unsigned char protocol; 39 | unsigned short checksum; 40 | unsigned long source_addr; 41 | unsigned long dest_addr; 42 | } __attribute__ ((packed)); 43 | 44 | struct UDPHeader{ 45 | struct IPv4Header ipv4header; 46 | unsigned short source_port; 47 | unsigned short destination_port; 48 | unsigned short length; 49 | unsigned short checksum; 50 | } __attribute__ ((packed)); 51 | 52 | struct DHCPDISCOVERHeader{ 53 | struct UDPHeader udpheader; 54 | unsigned char op; 55 | unsigned char htype; 56 | unsigned char hlen; 57 | unsigned char hops; 58 | unsigned long xid; 59 | unsigned short timing; 60 | unsigned short flags; 61 | unsigned long address_of_machine; 62 | unsigned long dhcp_offered_machine; 63 | unsigned long ip_addr_of_dhcp_server; 64 | unsigned long ip_addr_of_relay; 65 | unsigned char client_mac_addr [16]; 66 | unsigned char sname [64]; 67 | unsigned char file [128]; 68 | unsigned long magic_cookie; 69 | unsigned char options[76]; 70 | } __attribute__ ((packed)); 71 | 72 | struct DHCPREQUESTHeader{ 73 | struct UDPHeader udpheader; 74 | unsigned char op; 75 | unsigned char htype; 76 | unsigned char hlen; 77 | unsigned char hops; 78 | unsigned long xid; 79 | unsigned short timing; 80 | unsigned short flags; 81 | unsigned long address_of_machine; 82 | unsigned long dhcp_offered_machine; 83 | unsigned long ip_addr_of_dhcp_server; 84 | unsigned long ip_addr_of_relay; 85 | unsigned char client_mac_addr [16]; 86 | unsigned char sname [64]; 87 | unsigned char file [128]; 88 | unsigned long magic_cookie; 89 | unsigned char options[25]; 90 | } __attribute__ ((packed)); 91 | 92 | struct DNSREQUESTHeader{ 93 | struct UDPHeader udpheader; 94 | unsigned short transaction_id; 95 | unsigned short flags; 96 | unsigned short question_count; 97 | unsigned short answer_rr; 98 | unsigned short authority_rr; 99 | unsigned short aditional_rr; 100 | } __attribute__ ((packed)); 101 | 102 | 103 | void *getnetworkpackage(); 104 | void sendnetworkpackage(int type,int size,unsigned char *to,int where,int port); 105 | char initialisenetworkpackage(int type,int is_ip,unsigned char *to, int function, int port); -------------------------------------------------------------------------------- /include/stddef.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef D_size_t 4 | #define D_size_t 5 | typedef unsigned int size_t; 6 | #endif 7 | 8 | #ifndef D_NULL 9 | #define D_NULL 10 | #define NULL (void*)0 11 | #endif -------------------------------------------------------------------------------- /include/stdio.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef D_MSG 4 | #define D_MSG 5 | void msg(const char *ms); 6 | #endif 7 | 8 | #ifndef lock_filepointer 9 | #define lock_filepointer 10 | typedef int FILE; 11 | #define EOF 0 12 | FILE *stdout; 13 | FILE *stderr; 14 | #endif 15 | 16 | #ifndef D_fopen 17 | #define D_fopen 18 | FILE *fopen(const char *filename, const char *mode); 19 | #endif 20 | 21 | #ifndef D_fclose 22 | #define D_fclose 23 | int fclose(FILE *stream); 24 | #endif 25 | 26 | #ifndef D_FPRINTF 27 | #define D_FPRINTF 28 | int fprintf(FILE *stream, const char *format, ...); 29 | #endif 30 | 31 | #ifndef D_SPRINTF 32 | #define D_SPRINTF 33 | int sprintf(char *str, const char *format, ...); 34 | #endif 35 | 36 | #ifndef D_PRINTF 37 | #define D_PRINTF 38 | int printf(const char *format, ...); 39 | #endif 40 | 41 | #ifndef D_UNGETC 42 | #define D_UNGETC 43 | int ungetc(int chartoadd, FILE *stream); 44 | #endif 45 | 46 | #ifndef D_GETC 47 | #define D_GETC 48 | int getc(FILE *stream); 49 | #endif 50 | 51 | #ifndef _STDARG_H_ 52 | #define _STDARG_H_ 53 | 54 | typedef __builtin_va_list va_list; 55 | 56 | #define va_start(a,b) __builtin_va_start(a,b) 57 | #define va_end(a) __builtin_va_end(a) 58 | #define va_arg(a,b) __builtin_va_arg(a,b) 59 | #define __va_copy(d,s) __builtin_va_copy((d),(s)) 60 | 61 | #ifndef D_NULL 62 | #define D_NULL 63 | #define NULL (void*)0 64 | #endif 65 | 66 | #endif // _STDARG_H_ 67 | 68 | #ifndef D_VFPRINTF 69 | #define D_VFPRINTF 70 | 71 | int vfprintf(FILE *stream, const char *format, va_list arg); 72 | #endif 73 | 74 | #ifndef D_size_t 75 | #define D_size_t 76 | typedef unsigned int size_t; 77 | #endif 78 | 79 | #ifndef D_VSNPRINTF 80 | #define D_VSNPRINTF 81 | int vsnprintf(char *str, size_t size, const char *format, va_list ap); 82 | #endif 83 | 84 | #ifndef D_FREAD 85 | #define D_FREAD 86 | size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); 87 | #endif 88 | 89 | signed long write(int fd, const char *buf, unsigned long nbytes); 90 | int scanf ( const char * format, ... ); 91 | char *readstring(char* tv,int size); -------------------------------------------------------------------------------- /include/stdlib.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef D_EXIT 4 | #define D_EXIT 5 | #define EXIT_SUCCESS 0 6 | #define EXIT_FAILURE 1 7 | void exit(int status); 8 | #endif 9 | 10 | #ifndef D_FREE 11 | #define D_FREE 12 | void free(void *ptr); 13 | #endif 14 | 15 | #ifndef D_size_t 16 | #define D_size_t 17 | typedef unsigned int size_t; 18 | #endif 19 | 20 | #ifndef D_MALLOC 21 | #define D_MALLOC 22 | void *malloc(size_t size); 23 | #endif 24 | 25 | #ifndef D_CALLOC 26 | #define D_CALLOC 27 | void *calloc(size_t nitems, size_t size); 28 | #endif 29 | 30 | #ifndef D_REALPATH 31 | #define D_REALPATH 32 | char *realpath(const char * file_name,char * resolved_name); 33 | #endif 34 | 35 | #ifndef D_REALLOC 36 | #define D_REALLOC 37 | void *realloc(void *ptr, size_t size); 38 | #endif 39 | 40 | #ifndef D_STRTOL 41 | #define D_STRTOL 42 | long int strtol(const char *str, char **endptr, int base); 43 | int atoi(const char *nptr); 44 | long atol(const char *nptr); 45 | long long atoll(const char *nptr); 46 | long long atoq(const char *nptr); 47 | #endif 48 | 49 | #ifndef D_SYSTEM 50 | #define D_SYSTEM 51 | int system(const char *string); 52 | #endif 53 | 54 | unsigned short switch_endian16(unsigned short nb); -------------------------------------------------------------------------------- /include/string.h: -------------------------------------------------------------------------------- 1 | #ifndef D_strcmp 2 | #define D_strcmp 3 | int strcmp(const char *str1, const char *str2); 4 | #endif 5 | 6 | #ifndef D_size_t 7 | #define D_size_t 8 | typedef unsigned int size_t; 9 | #endif 10 | 11 | #ifndef D_strlen 12 | #define D_strlen 13 | size_t strlen(const char *str); 14 | #endif 15 | 16 | #ifndef D_memcpy 17 | #define D_memcpy 18 | void *memcpy(void *dest, const void * src, size_t n); 19 | #endif 20 | 21 | #ifndef D_MEMSET 22 | #define D_MEMSET 23 | void *memset(void *str, int c, size_t n); 24 | #endif 25 | 26 | #ifndef D_STPCPY 27 | #define D_STPCPY 28 | char* stpcpy(char *a, const char *b); 29 | #endif 30 | 31 | #ifndef D_STRNCPY 32 | #define D_STRNCPY 33 | char *strncpy(char *dest, const char *src, size_t n); 34 | #endif 35 | 36 | #ifndef D_STRLEN 37 | #define D_STRLEN 38 | size_t strlen(const char *str); 39 | #endif -------------------------------------------------------------------------------- /include/sys/cdefs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/include/sys/cdefs.h -------------------------------------------------------------------------------- /kernel.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/kernel.bin -------------------------------------------------------------------------------- /kernel/README.md: -------------------------------------------------------------------------------- 1 | # KERNEL FOLDER 2 | kernel source code 3 | 4 | ## Directories 5 | 6 | * dev (DEVices) : drivers 7 | * exec (EXECutables) : executable data and program loading service 8 | * fs (FileSystem) : file system implementations 9 | * hal (Hardware Abstraction Layer) : self explained 10 | * stub (base of the kernel [entrypoint loader]) : from grub to kernel transition management 11 | -------------------------------------------------------------------------------- /kernel/dev/cmos.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | // from: https://wiki.osdev.org/CMOS 4 | 5 | #define CMOS_PORT_ADDRESS 0x70 6 | #define CMOS_PORT_DATA 0x71 7 | 8 | unsigned char cmos_read(unsigned char port){ 9 | outportb(CMOS_PORT_ADDRESS,port); 10 | return inportb(CMOS_PORT_DATA); 11 | } 12 | 13 | unsigned char cmos_get_update_in_progress_flag(){ 14 | return cmos_read(0x0A) & 0x80; 15 | } 16 | 17 | unsigned char* cmos_update_datetime_to_variables(){ 18 | while(cmos_get_update_in_progress_flag()); 19 | unsigned char* data = (unsigned char*) malloc(6); 20 | data[0] = cmos_read(0); 21 | data[1] = cmos_read(2); 22 | data[2] = cmos_read(4); 23 | data[3] = cmos_read(7); 24 | data[4] = cmos_read(8); 25 | data[5] = cmos_read(9); 26 | return data; 27 | } 28 | 29 | void init_cmos(){ 30 | debugf("CMOS: ready!\n"); 31 | unsigned char *dataset = cmos_update_datetime_to_variables(); 32 | debugf("CMOS: %x:%x:%x %x/%x/%x \n",dataset[0],dataset[1],dataset[2],dataset[3],dataset[4],2000+dataset[5]); 33 | free(dataset); 34 | } -------------------------------------------------------------------------------- /kernel/dev/com_port.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | // 3 | // SERIAL 4 | // 5 | // 6 | 7 | extern void serialirq(); 8 | 9 | 10 | unsigned int serial_received(unsigned short PORT) { 11 | return inportb(PORT + 5) & 1; 12 | } 13 | 14 | unsigned char read_serial(unsigned short PORT) { 15 | while (serial_received(PORT) == 0); 16 | 17 | return inportb(PORT); 18 | } 19 | 20 | int is_transmit_empty(unsigned short PORT) { 21 | return inportb(PORT + 5) & 0x20; 22 | } 23 | 24 | void write_serial(char a,unsigned short PORT) { 25 | while (is_transmit_empty(PORT) == 0); 26 | 27 | outportb(PORT,a); 28 | } 29 | 30 | void writer_string_serial(char* message,unsigned short PORT){ 31 | for(int i = 0 ; i < strlen(message) ; i++){ 32 | write_serial(message[i],PORT); 33 | } 34 | } 35 | 36 | unsigned short getDefaultSerialPort(){ 37 | return 0x3f8; 38 | } 39 | 40 | static unsigned char last_com_char = 0; 41 | 42 | void irq_serial(){ 43 | unsigned short port = 0; 44 | if(serial_received(0x3f8)){ 45 | port = 0x3f8; 46 | }else if(serial_received(0x2f8)){ 47 | port = 0x2f8; 48 | }else if(serial_received(0x3e8)){ 49 | port = 0x3e8; 50 | }else if(serial_received(0x2e8)){ 51 | port = 0x2e8; 52 | }else{ 53 | debugf("[SER] Input via unknown port\n"); 54 | goto out; 55 | } 56 | debugf("[SER] Input via serial via port %x !\n",port); 57 | unsigned char binnengekomen = read_serial(port); 58 | last_com_char = binnengekomen; 59 | out: 60 | outportb(0x20, 0x20); 61 | outportb(0xA0, 0x20); 62 | } 63 | 64 | void init_serial_device(unsigned short PORT) { 65 | outportb(PORT + 1, 0x00); // Disable all interrupts 66 | outportb(PORT + 3, 0x80); // Enable DLAB (set baud rate divisor) 67 | outportb(PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud 68 | outportb(PORT + 1, 0x00); // (hi byte) 69 | outportb(PORT + 3, 0x03); // 8 bits, no parity, one stop bit 70 | outportb(PORT + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold 71 | outportb(PORT + 4, 0x0B); // IRQs enabled, RTS/DSR set 72 | outportb(PORT + 1, 1); 73 | setNormalInt(4,(unsigned long)serialirq); 74 | debugf("[SER] Serial %x installed!\n",PORT); 75 | } 76 | 77 | void init_serial(){ 78 | init_serial_device(0x3f8); 79 | init_serial_device(0x2f8); 80 | init_serial_device(0x3e8); 81 | init_serial_device(0x2e8); 82 | } 83 | -------------------------------------------------------------------------------- /kernel/dev/cpuid.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | #include "cpuid.h" 3 | 4 | char* cpuid_get_model(){ 5 | int buffer1 = 0; 6 | int buffer2 = 0; 7 | int buffer3 = 0; 8 | int nothing = 0; 9 | __cpuid(0,nothing,buffer1,buffer3,buffer2); 10 | char *strbuf = " "; 11 | strbuf[0] = buffer1 & 0xFF; 12 | strbuf[1] = (buffer1>>8) & 0xFF; 13 | strbuf[2] = (buffer1>>16) & 0xFF; 14 | strbuf[3] = (buffer1>>24) & 0xFF; 15 | strbuf[4] = buffer2 & 0xFF; 16 | strbuf[5] = (buffer2>>8) & 0xFF; 17 | strbuf[6] = (buffer2>>16) & 0xFF; 18 | strbuf[7] = (buffer2>>24) & 0xFF; 19 | strbuf[8] = buffer3 & 0xFF; 20 | strbuf[9] = (buffer3>>8) & 0xFF; 21 | strbuf[10] = (buffer3>>16) & 0xFF; 22 | strbuf[11] = (buffer3>>24) & 0xFF; 23 | return strbuf; 24 | } 25 | 26 | void cpuid_get_details(){ 27 | debugf("CPUVendor: \"%s\" \n",cpuid_get_model()); 28 | } -------------------------------------------------------------------------------- /kernel/dev/device.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | 4 | 5 | Device devices['Z'-'A']; 6 | int deviceint = 0; 7 | char *cwd; 8 | char *getcwd(){ 9 | if(cwd==NULL){ 10 | cwd = malloc(PATH_MAX); 11 | cwd[0] = '@'; 12 | } 13 | return cwd; 14 | } 15 | 16 | void setcwd(char *t){ 17 | cwd = t; 18 | } 19 | 20 | int getDeviceCount(){ 21 | return deviceint; 22 | } 23 | 24 | Device *getNextFreeDevice(){ 25 | int now = deviceint; 26 | deviceint++; 27 | return (Device *)&devices[now]; 28 | } 29 | 30 | char whoopsie[PATH_MAX]; 31 | char* dir(char* path){ 32 | for(int i = 0 ; i < 100 ; i++){ 33 | whoopsie[i] = 0x00; 34 | } 35 | if(path[0]=='@'){ 36 | int t = 0; 37 | for(int i = 0 ; i < deviceint ; i++){ 38 | if(devices[i].dir!=0){ 39 | if(t!=0){ 40 | whoopsie[t++] = ';'; 41 | } 42 | whoopsie[t++] = 'A'+i; 43 | } 44 | } 45 | whoopsie[t++] = 0x00; 46 | }else if(path[1]=='@'){ 47 | int z = path[0] - 'A'; 48 | if(devices[z].dir==0){ 49 | 50 | }else{ 51 | void* (*foo)(Device *,unsigned char*,char *) = (void*)devices[z].dir; 52 | foo((Device *)&devices[z],(unsigned char*)&path[2],whoopsie); 53 | } 54 | } 55 | return (char*) whoopsie; 56 | } 57 | 58 | char fexists(unsigned char* path){ 59 | for(int i = 0 ; i < 100 ; i++){ 60 | whoopsie[i] = 0x00; 61 | } 62 | 63 | if(path[1]=='@'){ 64 | int z = path[0] - 'A'; 65 | if(devices[z].existsFile==0){ 66 | return 0; 67 | }else{ 68 | char (*foo)(Device *,unsigned char*) = (void *)devices[z].existsFile; 69 | char result = (char)foo((Device *)&devices[z],(unsigned char*)&path[2]); 70 | return result; 71 | } 72 | }else if(path[0]==0x00){ 73 | return 0; 74 | }else{ 75 | //return 0; 76 | if(getDeviceCount()>0){ 77 | if(devices[0].existsFile==0){ 78 | return 0; 79 | } 80 | char (*foo)(Device *,unsigned char*) = (void *)devices[0].existsFile; 81 | return (char) foo((Device *)&devices[0],path); 82 | }else{ 83 | return 0; 84 | } 85 | } 86 | } 87 | 88 | int fread(char* path,unsigned char* buffer){ 89 | if(path[1]=='@'){ 90 | int z = path[0] - 'A'; 91 | if(devices[z].readFile==0){ 92 | return 0; 93 | }else{ 94 | unsigned char (*foo)(Device *,unsigned char*,unsigned char *) = (void*)devices[z].readFile; 95 | unsigned char t = foo((Device *)&devices[z],(unsigned char*)&path[2],buffer); 96 | return t; 97 | } 98 | } 99 | 100 | return 0; 101 | } 102 | 103 | int fwrite(char* path,unsigned char* buffer,unsigned long filesize){ 104 | if(path[1]=='@'){ 105 | int z = path[0] - 'A'; 106 | if(devices[z].writeFile==0){ 107 | return 0; 108 | }else{ 109 | unsigned char (*foo)(Device *,unsigned char*,unsigned char *,unsigned long) = (void*)devices[z].writeFile; 110 | unsigned char t = foo((Device *)&devices[z],(unsigned char*)&path[2],buffer,filesize); 111 | return t; 112 | } 113 | } 114 | 115 | return 0; 116 | } 117 | 118 | void raw_write(Device *device, unsigned long LBA, unsigned char count, unsigned short *location){ 119 | void* (*readraw)(Device *,unsigned long,unsigned char,unsigned short *) = (void*)device->writeRawSector; 120 | readraw(device,LBA,count,location); 121 | } -------------------------------------------------------------------------------- /kernel/dev/math.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | int pow(int base,int exp){ 4 | unsigned long value=1; 5 | while (exp!=0){ 6 | value*=base; 7 | --exp; 8 | } 9 | return value; 10 | } 11 | -------------------------------------------------------------------------------- /kernel/dev/soundblaster16.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | // info: https://wiki.osdev.org/Sound_Blaster_16 4 | // declaraties 5 | #define SOUNDBLASTER16_DSP_MIXER_PORT 0x224 6 | #define SOUNDBLASTER16_DSP_MIXER_DATA_PORT 0x225 7 | #define SOUNDBLASTER16_DSP_RESET 0x226 8 | #define SOUNDBLASTER16_DSP_READ 0x22A 9 | #define SOUNDBLASTER16_DSP_WRITE 0x22C 10 | #define SOUNDBLASTER16_DSP_READ_STATUS 0x22E 11 | #define SOUNDBLASTER16_DSP_16BACK 0x22F 12 | 13 | extern void sndirq(); 14 | volatile unsigned char soundblaster16_irq_fire = 0; 15 | void irq_snd(){ 16 | soundblaster16_irq_fire = 1; 17 | unsigned char tp1 = inportb(SOUNDBLASTER16_DSP_READ_STATUS); 18 | unsigned char tp2 = inportb(SOUNDBLASTER16_DSP_16BACK); 19 | debugf("[SNDBST] Interrupt fired with 1=%x 2=%x \n",tp1,tp2); 20 | outportb(0xA0,0x20); 21 | outportb(0x20,0x20); 22 | } 23 | 24 | void soundblaster16_reset(){ 25 | outportb(SOUNDBLASTER16_DSP_RESET,1); 26 | sleep(3); 27 | outportb(SOUNDBLASTER16_DSP_RESET,0); 28 | } 29 | 30 | int soundblaster16_detect(){ 31 | soundblaster16_reset(); 32 | unsigned char resultaat = inportb(SOUNDBLASTER16_DSP_READ); 33 | debugf("[SNDBST] Result reset=%x (Should be 0xAA)\n",resultaat); 34 | return resultaat==0xAA; 35 | } 36 | 37 | void soundblaster16_setVolume(unsigned char volume){ 38 | outportb(SOUNDBLASTER16_DSP_MIXER_PORT,0x22); 39 | outportb(SOUNDBLASTER16_DSP_MIXER_PORT,volume); 40 | } 41 | 42 | int soundblaster16_playSoundData(void *data,unsigned short size,unsigned char hertz,unsigned char mono,unsigned long bittransfers){ 43 | 44 | // speaker aanzetten 45 | outportb(SOUNDBLASTER16_DSP_WRITE,0xD1); 46 | 47 | // DMA activeren 48 | if(bittransfers==8){ 49 | outportb(0x0A,5); 50 | outportb(0x0C,1); 51 | outportb(0x0B,0x49); 52 | outportb(0x83,(((unsigned long)data)>>16)&0xFF); 53 | outportb(0x02,((unsigned long)data)&0xFF); 54 | outportb(0x02,(((unsigned long)data)>>8)&0xFF); 55 | outportb(0x03,size&0xFF); 56 | outportb(0x03,(size>>8)&0xFF); 57 | outportb(0x0A,1); 58 | }else if(bittransfers==16){ 59 | return 0; 60 | }else{ 61 | return 0; 62 | } 63 | 64 | // IRQ reset 65 | soundblaster16_irq_fire = 0; 66 | 67 | // TIME constant instellen 68 | outportb(SOUNDBLASTER16_DSP_WRITE,0x40); 69 | outportb(SOUNDBLASTER16_DSP_WRITE,hertz); 70 | 71 | outportb(SOUNDBLASTER16_DSP_WRITE,bittransfers==8?0xC0:0xB0); 72 | 73 | // transfermode instellen 74 | outportb(SOUNDBLASTER16_DSP_WRITE,0x00); 75 | 76 | // type aangeven 77 | outportb(SOUNDBLASTER16_DSP_WRITE,mono==0?0x20:0x00); 78 | 79 | // data lengte aangeven 80 | outportb(SOUNDBLASTER16_DSP_WRITE,size&0xFF); 81 | outportb(SOUNDBLASTER16_DSP_WRITE,(size>>8)&0xFF); 82 | 83 | // geluid afspelen 84 | again: 85 | if(soundblaster16_irq_fire==0){ 86 | goto again; 87 | } 88 | 89 | // geluid stoppen 90 | outportb(SOUNDBLASTER16_DSP_WRITE,0xD3); 91 | 92 | // stoppen 93 | return 1; 94 | } 95 | 96 | int soundblaster16_playSampleData(){ 97 | unsigned short size = 0x0005; 98 | for(unsigned short i = 0 ; i < size ; i++){ 99 | ((unsigned char*)0x1000)[i] = 0xCD; 100 | } 101 | soundblaster16_setVolume(0xFF); 102 | return soundblaster16_playSoundData((void *)0x1000,size,165,1,8); 103 | } 104 | 105 | void init_soundblaster16(){ 106 | 107 | // 108 | // detect and reset 109 | debugf("[SNDBST] Detecting possible existance of a soundblaster16 device\n"); 110 | if(soundblaster16_detect()==0){ 111 | debugf("[SNDBST] No soundblaster available\n"); 112 | return; 113 | } 114 | debugf("[SNDBST] Soundblaster available\n"); 115 | 116 | // 117 | // set interrupt 118 | unsigned char targetinterrupt = 5; 119 | debugf("[SNDBST] Setting interrupt to %x \n",targetinterrupt); 120 | setNormalInt(targetinterrupt,(unsigned long)sndirq); 121 | outportb(SOUNDBLASTER16_DSP_MIXER_PORT,0x80); 122 | outportb(SOUNDBLASTER16_DSP_MIXER_PORT,0x02); // 2= interrupt 5 123 | 124 | } -------------------------------------------------------------------------------- /kernel/dev/timer.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | // 4 | // TIMER 5 | // 6 | // 7 | 8 | extern void timerirq(); 9 | 10 | volatile int clock = 0; 11 | volatile int ticks = 0; 12 | 13 | int getTicks(){ 14 | Process *p = getCurrentProcess(); 15 | return p->ticks; 16 | } 17 | 18 | void resetTicks(){ 19 | Process *p = getCurrentProcess(); 20 | p->ticks = 0; 21 | } 22 | 23 | void sleep(int ms){ 24 | Process *p = getCurrentProcess(); 25 | p->timer = 0; 26 | again: 27 | if(p->timer < ms) { 28 | goto again; 29 | } 30 | } 31 | 32 | void irq_timer(){ 33 | Process *p = getCurrentProcess(); 34 | p->timer++; 35 | outportb(0x20,0x20); 36 | if(p->timer % 18 == 0){ 37 | p->ticks++; 38 | } 39 | } 40 | 41 | void init_timer(){ 42 | int divisor = 1193180 / 100; /* Calculate our divisor */ 43 | outportb(0x43, 0x36); /* Set our command byte 0x36 */ 44 | outportb(0x40, divisor & 0xFF); /* Set low byte of divisor */ 45 | outportb(0x40, divisor >> 8); /* Set high byte of divisor */ 46 | setNormalInt(0,(unsigned long)timerirq); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /kernel/dev/usb.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | 3 | // 4 | // In this file all calls to one of the USB drivers are listed 5 | unsigned long usb_send_bulk(USB_DEVICE *device,unsigned long count,void *buffer){ 6 | if(device->drivertype==1){ 7 | return EHCI_ERROR; 8 | }else if(device->drivertype==2){ 9 | return (unsigned long) ehci_send_bulk(device,buffer,count); 10 | }else if(device->drivertype==3){ 11 | return (unsigned long) xhci_send_bulk(device,buffer,count); 12 | }else{ 13 | return EHCI_ERROR; 14 | } 15 | } 16 | 17 | unsigned long usb_recieve_bulk(USB_DEVICE *device,unsigned long count,void *commando){ 18 | if(device->drivertype==1){ 19 | return EHCI_ERROR; 20 | }else if(device->drivertype==2){ 21 | return (unsigned long) ehci_recieve_bulk(device,count,commando); 22 | }else if(device->drivertype==3){ 23 | return EHCI_ERROR; 24 | }else{ 25 | return EHCI_ERROR; 26 | } 27 | } 28 | 29 | void *usb_send_and_recieve_control(USB_DEVICE *device,void *commando,void *buffer){ 30 | if(device->drivertype==1){ 31 | return (void *)EHCI_ERROR; 32 | }else if(device->drivertype==2){ 33 | return (void *) ehci_send_and_recieve_command(device->portnumber,commando,buffer); 34 | }else if(device->drivertype==3){ 35 | return (void *) xhci_send_and_recieve_command(device,commando,buffer); 36 | }else{ 37 | printf("[USB] PANIC: invalid drivertype %x \n",device->drivertype); 38 | return (void *)EHCI_ERROR; 39 | } 40 | } 41 | 42 | void usb_device_install(USB_DEVICE *device){ 43 | // https://www.usb.org/defined-class-codes 44 | if(device->class==8){ 45 | debugf("[USB] Port %x : Mass Storage Device detected!\n",device->portnumber); 46 | usb_stick_init(device); 47 | }else if(device->class==3){ 48 | debugf("[USB] Port %x : Human Interface Device detected!\n",device->portnumber); 49 | init_usb_hid(device); 50 | }else{ 51 | debugf("[USB] Port %x : Unable to understand deviceclass: %x \n",device->portnumber,device->class); 52 | printf("[USB] Port %x : Unable to understand deviceclass: %x \n",device->portnumber,device->class); 53 | for(;;); 54 | } 55 | } -------------------------------------------------------------------------------- /kernel/dev/usb_hid.c: -------------------------------------------------------------------------------- 1 | #include "../kernel.h" 2 | // OSDEV article: https://wiki.osdev.org/USB_Human_Interface_Devices 3 | 4 | unsigned char usb_get_packed_hid(USB_DEVICE* device,unsigned long devicedesc){ 5 | EhciCMD* commando = (EhciCMD*) malloc(sizeof(EhciCMD)); 6 | commando->bRequest = 1; 7 | commando->bRequestType = 0xA1; 8 | commando->wIndex = 0; 9 | commando->wLength = 3; 10 | commando->wValue = 0x0100; 11 | unsigned char *res = usb_send_and_recieve_control(device,commando,(void *)devicedesc); 12 | free(commando); 13 | return res[0]; 14 | } 15 | 16 | unsigned char get_usb_hid_keyboard_input(USB_DEVICE* device,unsigned char wait){ 17 | unsigned volatile char devicedesc[10]; 18 | again: 19 | wait++; 20 | unsigned char res = usb_get_packed_hid(device,(unsigned long)&devicedesc); 21 | if(res!=(EHCI_ERROR&0xFF)){ 22 | if(devicedesc[2]!=0){ 23 | unsigned char tx = devicedesc[2]; 24 | if(tx<0xFF){ 25 | unsigned char kbdus[128] ={ 26 | 1, 27 | 1, 28 | 1, 29 | 1, 30 | 'a', // 0x04 31 | 'b', 32 | 'c', 33 | 'd', 34 | 'e', // 0x08 35 | 'f', 36 | 'g', 37 | 'h', 38 | 'i', // 0x0C 39 | 'j', 40 | 'k', 41 | 'l', 42 | 'm', 43 | 'n', 44 | 'o', // 0x12 45 | 'p', // 0x13 46 | 'q', // 0x14 47 | 'r', // 0x15 48 | 's', 49 | 't', // 0x17 50 | 'u', // 0x18 51 | 'v', 52 | 'w', // 0x1A 53 | 'x', 54 | 'y', // 0x1C 55 | 'z', 56 | '1', 57 | '2', 58 | '3', 59 | '4', 60 | '5', 61 | '6', 62 | '7', 63 | '8', 64 | '9' 65 | }; 66 | if(tx==0x52){ 67 | return VK_UP; 68 | }else if(tx==0x51){ 69 | return VK_DOWN; 70 | }else if(tx==0x50){ 71 | return VK_LEFT; 72 | }else if(tx==0x4F){ 73 | return VK_RIGHT; 74 | }else if(tx==0x28){ 75 | return '\n'; 76 | }else{ 77 | return kbdus[tx]; 78 | } 79 | } 80 | } 81 | }else{ 82 | return 0; 83 | } 84 | if(wait){ 85 | sleep(100); 86 | goto again; 87 | } 88 | return 0; 89 | } 90 | 91 | //void init_usb_hid_mouse(USB_DEVICE* device){ 92 | // unsigned char (*send)(USB_DEVICE* device,TRB setup,TRB data,TRB end) = (void*)device->sendMessage; 93 | //} 94 | 95 | unsigned long usb_hid_has_keyboard = 0; 96 | 97 | unsigned long usb_get_keyboard(){ 98 | return usb_hid_has_keyboard; 99 | } 100 | 101 | void init_usb_hid_keyboard(USB_DEVICE* device){ 102 | // 103 | // Use GET_REPORT protocol 104 | usb_hid_has_keyboard = (unsigned long)device; 105 | 106 | return; 107 | } 108 | 109 | void init_usb_hid(USB_DEVICE* device){ 110 | 111 | printf("[HID] Port %x : Is a Human Interface Device\n",device->portnumber); 112 | if(device->subclass==1){ 113 | printf("[HID] Port %x : HID : bootprotocol supported\n",device->portnumber); 114 | }else if(device->subclass==0){ 115 | printf("[HID] Port %x : HID : reportprotocol supported\n",device->portnumber); 116 | }else{ 117 | printf("[HID] Port %x : HID : unknown protocol\n",device->portnumber); 118 | } 119 | 120 | // 121 | // Use SET_PROTOCOL to boot protocol 122 | EhciCMD* commando = (EhciCMD*) malloc(sizeof(EhciCMD)); 123 | commando->bRequest = 0x0B; 124 | commando->bRequestType = 0x21; 125 | commando->wIndex = 0; 126 | commando->wLength = 0; 127 | commando->wValue = 0; 128 | unsigned char *res = usb_send_and_recieve_control(device,commando,0); 129 | free(commando); 130 | if((unsigned long)res==EHCI_ERROR){ 131 | printf("[HID] Unable to set protocol\n"); 132 | return; 133 | } 134 | 135 | // 136 | // Init the rest of the devices 137 | if(device->protocol==1){ 138 | printf("[HID] Port %x : is keyboard\n",device->portnumber); 139 | init_usb_hid_keyboard(device); 140 | }else if(device->protocol==2){ 141 | printf("[HID] Port %x : is mouse\n",device->portnumber); 142 | }else{ 143 | printf("[HID] Port %x : unknown HID type %x \n",device->portnumber,device->protocol); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /kernel/exec/program.c: -------------------------------------------------------------------------------- 1 | #include "../status.h" 2 | #include "../kernel.h" 3 | #include "program.h" 4 | 5 | static int kernel_program_load_elf(const char *buffer) 6 | { 7 | unsigned long gamma = loadelf((void *)buffer); 8 | if (gamma == 0) 9 | { 10 | return -EIO; 11 | } 12 | 13 | cls(); 14 | void *(*foo)() = (void *)gamma; 15 | foo(); 16 | 17 | return 0; 18 | } 19 | 20 | int kernel_program_load(const char *path) 21 | { 22 | unsigned char *buffer = (unsigned char *)0x2000; 23 | if(fread((char *)path, buffer) == 0) 24 | { 25 | return -EIO; 26 | } 27 | 28 | if (iself(buffer)) 29 | { 30 | kernel_program_load_elf((char *)buffer); 31 | return 0; 32 | } 33 | 34 | asm volatile("call 0x2000"); 35 | return 0; 36 | } -------------------------------------------------------------------------------- /kernel/exec/program.h: -------------------------------------------------------------------------------- 1 | #ifndef PROGRAM_H 2 | #define PROGRAM_H 3 | 4 | int kernel_program_load(const char* path); 5 | 6 | #endif -------------------------------------------------------------------------------- /kernel/hal/i386/io_ports.c: -------------------------------------------------------------------------------- 1 | // I always thought that I need to include headers where I defined the functions 2 | // in the header but this made me realize that is not necesary. 3 | // Is it better for compilation time tho? 4 | 5 | 6 | unsigned long inportl (unsigned short _port){ 7 | asm volatile ("cli"); 8 | unsigned long rv; 9 | __asm__ __volatile__ ("inl %1, %0" : "=a" (rv) : "dN" (_port)); 10 | asm volatile ("sti"); 11 | return rv; 12 | } 13 | 14 | void outportl (unsigned short _port, unsigned long _data){ 15 | asm volatile ("cli"); 16 | __asm__ __volatile__ ("outl %1, %0" : : "dN" (_port), "a" (_data)); 17 | asm volatile ("sti"); 18 | } 19 | 20 | 21 | unsigned short inportw (unsigned short _port){ 22 | asm volatile ("cli"); 23 | unsigned short rv; 24 | __asm__ __volatile__ ("inw %1, %0" : "=a" (rv) : "dN" (_port)); 25 | asm volatile ("sti"); 26 | return rv; 27 | } 28 | 29 | void outportw (unsigned short _port, unsigned short _data){ 30 | asm volatile ("cli"); 31 | __asm__ __volatile__ ("outw %1, %0" : : "dN" (_port), "a" (_data)); 32 | asm volatile ("sti"); 33 | } 34 | 35 | unsigned char inportb (unsigned short _port){ 36 | asm volatile ("cli"); 37 | unsigned char rv; 38 | __asm__ __volatile__ ("inb %1, %0" : "=a" (rv) : "dN" (_port)); 39 | asm volatile ("sti"); 40 | return rv; 41 | } 42 | 43 | void outportb (unsigned short _port, unsigned char _data){ 44 | asm volatile ("cli"); 45 | __asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data)); 46 | asm volatile ("sti"); 47 | } 48 | -------------------------------------------------------------------------------- /kernel/hal/i386/paging.asm: -------------------------------------------------------------------------------- 1 | .text 2 | .globl loadPageDirectory 3 | loadPageDirectory: 4 | push %ebp 5 | mov %esp, %ebp 6 | mov 8(%esp), %eax 7 | mov %eax, %cr3 8 | mov %ebp, %esp 9 | pop %ebp 10 | ret 11 | 12 | .text 13 | .globl enablePaging 14 | enablePaging: 15 | push %ebp 16 | mov %esp, %ebp 17 | mov %cr0, %eax 18 | or $0x80000000, %eax 19 | mov %eax, %cr0 20 | mov %ebp, %esp 21 | pop %ebp 22 | ret 23 | -------------------------------------------------------------------------------- /kernel/hal/i386/paging.c: -------------------------------------------------------------------------------- 1 | #include "../../kernel.h" 2 | 3 | #define PAGE_DIRECTORY_SIZE 1024 4 | 5 | extern void loadPageDirectory(unsigned long*); 6 | extern void enablePaging(); 7 | 8 | unsigned long page_directory[PAGE_DIRECTORY_SIZE] __attribute__((aligned(4096))); 9 | //unsigned long first_page_table[PAGE_DIRECTORY_SIZE] __attribute__((aligned(4096))); 10 | 11 | void paging_clear_directory_pages(){ 12 | for(int i = 0 ; i < PAGE_DIRECTORY_SIZE ; i++){ 13 | page_directory[i] = 0x00000002; 14 | } 15 | } 16 | 17 | unsigned int pagecount = 0; 18 | 19 | void set_paging_frame(unsigned long addr){ 20 | unsigned long addr2 = addr; 21 | addr2 -= (addr2 & 0xFFF); 22 | debugf("[PAGING] Create page for %x \n",addr2); 23 | long *first_page_table = malloc_align(PAGE_DIRECTORY_SIZE*sizeof(unsigned long),4096); 24 | for(int i = 0 ; i < PAGE_DIRECTORY_SIZE ; i++){ 25 | first_page_table[i] = (addr2+(i * 0x1000)) | 0x3; 26 | } 27 | page_directory[pagecount++] = ((unsigned int)first_page_table) | 0x3; 28 | } 29 | 30 | void init_paging(){ 31 | debugf("[PAGING] Setting up paging...\n"); 32 | debugf("[PAGING] Directory table at %x with size %x \n",&page_directory,PAGE_DIRECTORY_SIZE); 33 | paging_clear_directory_pages(); 34 | 35 | // 36 | // minimal setup, create one pagedir with linear address 1:1 37 | set_paging_frame(0); 38 | 39 | debugf("[PAGING] Tell CPU where page tables are\n"); 40 | loadPageDirectory(page_directory); 41 | 42 | debugf("[PAGING] Tell CPU to use paging\n"); 43 | #ifdef ENABLE_PAGING 44 | enablePaging(); 45 | #endif 46 | 47 | debugf("[PAGING] Paging is enabled\n"); 48 | } -------------------------------------------------------------------------------- /kernel/hal/i386/video.asm: -------------------------------------------------------------------------------- 1 | ;in: edi=4k buffer 2 | ;out: buffer filled with font 3 | ;clear even/odd mode 4 | global video_load_font 5 | extern _fontbuffer 6 | video_load_font: 7 | mov edi, _fontbuffer 8 | mov dx, 03ceh 9 | mov ax, 5 10 | out dx, ax 11 | ;map VGA memory to 0A0000h 12 | mov ax, 0406h 13 | out dx, ax 14 | ;set bitplane 2 15 | mov dx, 03c4h 16 | mov ax, 0402h 17 | out dx, ax 18 | ;clear even/odd mode (the other way, don't ask why) 19 | mov ax, 0604h 20 | out dx, ax 21 | ;copy charmap 22 | mov esi, 0A0000h 23 | mov ecx, 256 24 | ;copy 16 bytes to bitmap 25 | .loopie: 26 | movsd 27 | movsd 28 | movsd 29 | movsd 30 | ;skip another 16 bytes 31 | add esi, 16 32 | loop .loopie 33 | ;restore VGA state to normal operation 34 | mov ax, 0302h 35 | out dx, ax 36 | mov ax, 0204h 37 | out dx, ax 38 | mov dx, 03ceh 39 | mov ax, 1005h 40 | out dx, ax 41 | mov ax, 0E06h 42 | out dx, ax 43 | ret 44 | -------------------------------------------------------------------------------- /kernel/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_fstart) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 1M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.multiboot) 19 | *(.text) 20 | } 21 | 22 | /* Read-only data. */ 23 | .rodata BLOCK(4K) : ALIGN(4K) 24 | { 25 | *(.rodata) 26 | } 27 | 28 | /* Read-write data (initialized) */ 29 | .data BLOCK(4K) : ALIGN(4K) 30 | { 31 | *(.data) 32 | } 33 | 34 | /* Read-write data (uninitialized) and stack */ 35 | .bss BLOCK(4K) : ALIGN(4K) 36 | { 37 | *(COMMON) 38 | *(.bss) 39 | } 40 | 41 | /* The compiler may produce other sections, by default it will put them in 42 | a segment with the same name. Simply add stuff here as needed. */ 43 | endKernelMemory = ALIGN(4K); 44 | } 45 | -------------------------------------------------------------------------------- /kernel/myos.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/kernel/myos.bin -------------------------------------------------------------------------------- /kernel/status.h: -------------------------------------------------------------------------------- 1 | #ifndef STATUS_H 2 | #define STATUS_H 3 | 4 | #define EOK 0 5 | #define EIO 1 6 | 7 | #endif -------------------------------------------------------------------------------- /kernel/stdarg.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _STDARG_H_ 4 | #define _STDARG_H_ 5 | 6 | typedef __builtin_va_list va_list; 7 | 8 | #define va_start(a,b) __builtin_va_start(a,b) 9 | #define va_end(a) __builtin_va_end(a) 10 | #define va_arg(a,b) __builtin_va_arg(a,b) 11 | #define __va_copy(d,s) __builtin_va_copy((d),(s)) 12 | 13 | #define NULL (void*)0 14 | 15 | #endif // _STDARG_H_ 16 | -------------------------------------------------------------------------------- /lib/libsos.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/lib/libsos.a -------------------------------------------------------------------------------- /lib/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_start) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 2M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.text) 19 | } 20 | 21 | /* Read-only data. */ 22 | .rodata BLOCK(4K) : ALIGN(4K) 23 | { 24 | *(.rodata) 25 | } 26 | 27 | /* Read-write data (initialized) */ 28 | .data BLOCK(4K) : ALIGN(4K) 29 | { 30 | *(.data) 31 | } 32 | 33 | /* Read-write data (uninitialized) and stack */ 34 | .bss BLOCK(4K) : ALIGN(4K) 35 | { 36 | *(COMMON) 37 | *(.bss) 38 | } 39 | 40 | /* The compiler may produce other sections, by default it will put them in 41 | a segment with the same name. Simply add stuff here as needed. */ 42 | } 43 | -------------------------------------------------------------------------------- /lib/modern.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/lib/modern.o -------------------------------------------------------------------------------- /lib/stub.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; Requires the SoS Development Kit 3 | ; 4 | 5 | format ELF 6 | public _start 7 | extrn main 8 | extrn exit 9 | 10 | 11 | ; section .bss 12 | ; align 16 13 | ; stack_bottom: 14 | ; resb 16384 ; 16 KiB 15 | ; stack_top: 16 | 17 | section '.text' executable 18 | 19 | _start: 20 | ; cli 21 | ; mov esp, stack_top 22 | ; xor ebp, ebp 23 | ; sti 24 | 25 | push _char_c 26 | push 1 27 | call main 28 | ; exit 29 | push eax ; exitcode van main zit in eax 30 | call exit 31 | ret 32 | 33 | fasm: db './compiler.bin', 0 34 | _char_c dd fasm,0 -------------------------------------------------------------------------------- /lib/stub.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/lib/stub.o -------------------------------------------------------------------------------- /lib/user32.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/lib/user32.o -------------------------------------------------------------------------------- /programs/assembler.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/assembler.bin -------------------------------------------------------------------------------- /programs/base.as: -------------------------------------------------------------------------------- 1 | [BITS 32] 2 | 3 | ; The multiboot standard does not define the value of the stack pointer register 4 | ; (esp) and it is up to the kernel to provide a stack. This allocates room for a 5 | ; small stack by creating a symbol at the bottom of it, then allocating 16384 6 | ; bytes for it, and finally creating a symbol at the top. The stack grows 7 | ; downwards on x86. The stack is in its own section so it can be marked nobits, 8 | ; which means the kernel file is smaller because it does not contain an 9 | ; uninitialized stack. The stack on x86 must be 16-byte aligned according to the 10 | ; System V ABI standard and de-facto extensions. The compiler will assume the 11 | ; stack is properly aligned and failure to align the stack will result in 12 | ; undefined behavior. 13 | section .bss 14 | align 16 15 | stack_bottom: 16 | resb 200 ; 16 KiB 17 | stack_top: 18 | 19 | ; The linker script specifies _start as the entry point to the kernel and the 20 | ; bootloader will jump to this position once the kernel has been loaded. It 21 | ; doesn't make sense to return from this function as the bootloader is gone. 22 | ; Declare _start as a function symbol with the given symbol size. 23 | section .text 24 | global _start:function (_start.end - _start) 25 | _start: 26 | ; The bootloader has loaded us into 32-bit protected mode on a x86 27 | ; machine. Interrupts are disabled. Paging is disabled. The processor 28 | ; state is as defined in the multiboot standard. The kernel has full 29 | ; control of the CPU. The kernel can only make use of hardware features 30 | ; and any code it provides as part of itself. There's no printf 31 | ; function, unless the kernel provides its own header and a 32 | ; printf implementation. There are no security restrictions, no 33 | ; safeguards, no debugging mechanisms, only what the kernel provides 34 | ; itself. It has absolute and complete power over the 35 | ; machine. 36 | 37 | ; To set up a stack, we set the esp register to point to the top of our 38 | ; stack (as it grows downwards on x86 systems). This is necessarily done 39 | ; in assembly as languages such as C cannot function without a stack. 40 | mov esp, stack_top 41 | 42 | ; This is a good place to initialize crucial processor state before the 43 | ; high-level kernel is entered. It's best to minimize the early 44 | ; environment where crucial features are offline. Note that the 45 | ; processor is not fully initialized yet: Features such as floating 46 | ; point instructions and instruction set extensions are not initialized 47 | ; yet. The GDT should be loaded here. Paging should be enabled here. 48 | ; C++ features such as global constructors and exceptions will require 49 | ; runtime support to work as well. 50 | 51 | ; Enter the high-level kernel. The ABI requires the stack is 16-byte 52 | ; aligned at the time of the call instruction (which afterwards pushes 53 | ; the return pointer of size 4 bytes). The stack was originally 16-byte 54 | ; aligned above and we've since pushed a multiple of 16 bytes to the 55 | ; stack since (pushed 0 bytes so far) and the alignment is thus 56 | ; preserved and the call is well defined. 57 | ; note, that if you are building on Windows, C functions may have "_" prefix in assembly: _kernel_main 58 | extern main 59 | call main 60 | 61 | ; If the system has nothing more to do, put the computer into an 62 | ; infinite loop. To do that: 63 | ; 1) Disable interrupts with cli (clear interrupt enable in eflags). 64 | ; They are already disabled by the bootloader, so this is not needed. 65 | ; Mind that you might later enable interrupts and return from 66 | ; kernel_main (which is sort of nonsensical to do). 67 | ; 2) Wait for the next interrupt to arrive with hlt (halt instruction). 68 | ; Since they are disabled, this will lock up the computer. 69 | ; 3) Jump to the hlt instruction if it ever wakes up due to a 70 | ; non-maskable interrupt occurring or due to system management mode. 71 | cli 72 | .hang: hlt 73 | jmp .hang 74 | 75 | .end: 76 | 77 | -------------------------------------------------------------------------------- /programs/basic.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/basic.bin -------------------------------------------------------------------------------- /programs/basic/basic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/basic/basic -------------------------------------------------------------------------------- /programs/basic/basic.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/basic/basic.o -------------------------------------------------------------------------------- /programs/basic/build.sh: -------------------------------------------------------------------------------- 1 | fasm startup.asm startup.o || exit 2 | gcc -I ../../include -c basic.c -m32 -o basic.o -m32 -std=gnu99 -ffreestanding -Wall -Wextra -Wno-unused-parameter || exit 3 | gcc -T linker.ld -o ./basic -m32 -ffreestanding -O2 -nostdlib startup.o basic.o ../../lib/user32.o ../../lib/modern.o || exit 4 | cp ./basic ../basic.bin -------------------------------------------------------------------------------- /programs/basic/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_start) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 5M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.text) 19 | } 20 | 21 | /* Read-only data. */ 22 | .rodata BLOCK(4K) : ALIGN(4K) 23 | { 24 | *(.rodata) 25 | } 26 | 27 | /* Read-write data (initialized) */ 28 | .data BLOCK(4K) : ALIGN(4K) 29 | { 30 | *(.data) 31 | } 32 | 33 | /* Read-write data (uninitialized) and stack */ 34 | .bss BLOCK(4K) : ALIGN(4K) 35 | { 36 | *(COMMON) 37 | *(.bss) 38 | } 39 | 40 | /* The compiler may produce other sections, by default it will put them in 41 | a segment with the same name. Simply add stuff here as needed. */ 42 | } 43 | -------------------------------------------------------------------------------- /programs/basic/startup.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | public _start 4 | extrn main 5 | 6 | section '.text' executable 7 | 8 | _start: 9 | call main 10 | ret 11 | -------------------------------------------------------------------------------- /programs/basic/startup.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/basic/startup.o -------------------------------------------------------------------------------- /programs/chat.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/chat.bin -------------------------------------------------------------------------------- /programs/chat/build.sh: -------------------------------------------------------------------------------- 1 | gcc -I ../../include -c chat.c -m32 -o chat.o -m32 -std=gnu99 -ffreestanding -Wall -Wextra -Wno-unused-parameter || exit 2 | gcc -T ./../../lib/linker.ld -o ./chat -m32 -ffreestanding -O2 -nostdlib chat.o ./../../lib/user32.o ./../../lib/modern.o ./../../lib/stub.o || exit 3 | cp ./chat ../chat.bin -------------------------------------------------------------------------------- /programs/chat/chat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/chat/chat -------------------------------------------------------------------------------- /programs/chat/chat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define MESSAGEBUFFER 25 6 | #define PORT 20001 7 | 8 | volatile unsigned char buffer[MESSAGEBUFFER]; 9 | 10 | void clearbuffer(){ 11 | for(int i = 0 ; i < MESSAGEBUFFER ; i++){buffer[i]=0;} 12 | } 13 | 14 | int main(int argc, char** argv){ 15 | printf("Im ready for it!\nEnter the target ip followed by the port:"); 16 | char* toz = (char*) malloc(12); 17 | char* t0z = (char*) malloc(2); 18 | t0z[0] = '.'; 19 | t0z[1] = 0; 20 | volatile unsigned char torry[SIZE_OF_IP]; 21 | readstring(toz,3); 22 | torry[0] = strtol(toz,NULL,10); 23 | write(1,(const char*)(t0z),1); 24 | readstring(toz,3); 25 | torry[1] = strtol(toz,NULL,10); 26 | write(1,(const char*)(t0z),1); 27 | readstring(toz,3); 28 | torry[2] = strtol(toz,NULL,10); 29 | write(1,(const char*)(t0z),1); 30 | readstring(toz,3); 31 | torry[3] = strtol(toz,NULL,10); 32 | t0z[0] = '@'; 33 | write(1,(const char*)(t0z),1); 34 | readstring(toz,5); 35 | int port = strtol(toz,NULL,10); 36 | t0z[0] = '\n'; 37 | t0z[1] = 0; 38 | write(1,(const char*)(t0z),1); 39 | while(1){ 40 | clearbuffer(); 41 | for(int i = 0 ; i < MESSAGEBUFFER ; i++){ 42 | unsigned char y = getc((FILE*)1) & 0x000000FF; 43 | buffer[i] = y; 44 | write(1, (void *)&buffer[i], 1); 45 | if(y=='\n'){ 46 | buffer[i+1] = 0; 47 | break; 48 | } 49 | } 50 | unsigned char ipaddr[SIZE_OF_IP] = {torry[0],torry[1],torry[2],torry[3]}; 51 | sendnetworkpackage(1,MESSAGEBUFFER,(unsigned char*)&ipaddr,(int)(&buffer),port); 52 | void *edx; 53 | while(1){ 54 | edx = getnetworkpackage(); 55 | struct EthernetHeader* eh = (struct EthernetHeader*) edx; 56 | if(eh->type==ETHERNET_TYPE_IP4){ 57 | struct IPv4Header* ip = (struct IPv4Header*) edx; 58 | if(ip->protocol==17){ 59 | struct UDPHeader* udp = (struct UDPHeader*) edx; 60 | if(udp->destination_port==switch_endian16(port)){ 61 | break; 62 | } 63 | } 64 | } 65 | } 66 | clearbuffer(); 67 | for(int i = 0 ; i < MESSAGEBUFFER ; i++){ 68 | buffer[i]=((unsigned char*)edx)[i+sizeof(struct UDPHeader)]; 69 | if(buffer[i]==0){ 70 | buffer[i] = '\n'; 71 | buffer[i+1] = '\0'; 72 | break; 73 | } 74 | } 75 | write(1, (void*)&buffer, MESSAGEBUFFER); 76 | buffer[0] = '\n'; 77 | write(1,(const char*)(&buffer),1); 78 | } 79 | return EXIT_SUCCESS; 80 | } -------------------------------------------------------------------------------- /programs/chat/chat.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/chat/chat.o -------------------------------------------------------------------------------- /programs/compiler.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/compiler.bin -------------------------------------------------------------------------------- /programs/dragoncompiler/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ -d ../../../DragonCompiler ] 3 | then 4 | fasm stub.asm stub.o 5 | cp ../../../DragonCompiler/Makefile ./makefilebackup 6 | cp ./SanderOSUSBMakefile ../../../DragonCompiler/Makefile 7 | cp ./linker.ld ../../../DragonCompiler/linker.ld 8 | cd ../../../DragonCompiler 9 | make clean 10 | make 11 | rm ./linker.ld 12 | cd ../SanderOSUSB/programs/dragoncompiler 13 | cp ./makefilebackup ../../../DragonCompiler/Makefile 14 | fi -------------------------------------------------------------------------------- /programs/dragoncompiler/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_start) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 2M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.text) 19 | } 20 | 21 | /* Read-only data. */ 22 | .rodata BLOCK(4K) : ALIGN(4K) 23 | { 24 | *(.rodata) 25 | } 26 | 27 | /* Read-write data (initialized) */ 28 | .data BLOCK(4K) : ALIGN(4K) 29 | { 30 | *(.data) 31 | } 32 | 33 | /* Read-write data (uninitialized) and stack */ 34 | .bss BLOCK(4K) : ALIGN(4K) 35 | { 36 | *(COMMON) 37 | *(.bss) 38 | } 39 | 40 | /* The compiler may produce other sections, by default it will put them in 41 | a segment with the same name. Simply add stuff here as needed. */ 42 | } 43 | -------------------------------------------------------------------------------- /programs/dragoncompiler/stub.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Requires the SoS Development Kit 3 | ; 4 | 5 | format ELF 6 | public _start 7 | extrn main 8 | extrn exit 9 | 10 | section '.text' executable 11 | 12 | _start: 13 | push _char_c 14 | push 5 15 | call main 16 | ; exit 17 | push eax ; exitcode van main zit in eax 18 | call exit 19 | ret 20 | 21 | filenamebuffer: db 'A@PRGS/CODE.C', 0 22 | fileoutbuffer: db 'A@PRGS/TEGT.ASM', 0 23 | fasm: db './compiler.bin', 0 24 | dashm: db '-m', 0 25 | ten: db '10', 0 26 | _char_c dd fasm, filenamebuffer, fileoutbuffer, dashm, ten -------------------------------------------------------------------------------- /programs/dragoncompiler/stub.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/dragoncompiler/stub.o -------------------------------------------------------------------------------- /programs/example.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/example.bin -------------------------------------------------------------------------------- /programs/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const char *messagestring = "This is an example program\n"; 4 | char dinges[1]; 5 | 6 | void main(){ 7 | printf(messagestring); 8 | while(1){ 9 | read(STDIO,(char*)&dinges,1); 10 | if(dinges[0]!=0x00){ 11 | break; 12 | } 13 | } 14 | printf("\nacknowledge!"); 15 | exit(); 16 | } 17 | -------------------------------------------------------------------------------- /programs/fasm/build.sh: -------------------------------------------------------------------------------- 1 | cd source 2 | cd SoS 3 | bash build.sh 4 | cp fasm ../../../assembler.bin -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/elf.inc: -------------------------------------------------------------------------------- 1 | 2 | macro Elf32_Sym name,value,size,bind,type,other,shndx 3 | { 4 | dd name+0 5 | dd value+0 6 | dd size+0 7 | db (bind+0) shl 4 + (type+0) 8 | db other+0 9 | dw shndx+0 10 | } 11 | 12 | virtual at 0 13 | Elf32_Sym 14 | sizeof.Elf32_Sym = $ 15 | end virtual 16 | 17 | macro Elf32_Rel offset,symbol,type 18 | { 19 | dd offset+0 20 | dd (symbol+0) shl 8 + (type+0) 21 | } 22 | 23 | virtual at 0 24 | Elf32_Rel 25 | sizeof.Elf32_Rel = $ 26 | end virtual 27 | 28 | macro Elf32_Rela offset,symbol,type,addend 29 | { 30 | dd offset+0 31 | dd (symbol+0) shl 8 + (type+0) 32 | dd addend+0 33 | } 34 | 35 | virtual at 0 36 | Elf32_Rela 37 | sizeof.Elf32_Rela = $ 38 | end virtual 39 | 40 | macro Elf64_Sym name,value,size,bind,type,other,shndx 41 | { 42 | dd name+0 43 | db (bind+0) shl 4 + (type+0) 44 | db other+0 45 | dw shndx+0 46 | dq value+0 47 | dq size+0 48 | } 49 | 50 | virtual at 0 51 | Elf64_Sym 52 | sizeof.Elf64_Sym = $ 53 | end virtual 54 | 55 | macro Elf64_Rel offset,symbol,type 56 | { 57 | dq offset+0 58 | dq (symbol+0) shl 32 + (type+0) 59 | } 60 | 61 | virtual at 0 62 | Elf64_Rel 63 | sizeof.Elf64_Rel = $ 64 | end virtual 65 | 66 | macro Elf64_Rela offset,symbol,type,addend 67 | { 68 | dq offset+0 69 | dq (symbol+0) shl 32 + (type+0) 70 | dq addend+0 71 | } 72 | 73 | virtual at 0 74 | Elf64_Rela 75 | sizeof.Elf64_Rela = $ 76 | end virtual 77 | 78 | DT_NULL = 0 79 | DT_NEEDED = 1 80 | DT_HASH = 4 81 | DT_STRTAB = 5 82 | DT_SYMTAB = 6 83 | DT_RELA = 7 84 | DT_RELASZ = 8 85 | DT_RELAENT = 9 86 | DT_STRSZ = 10 87 | DT_SYMENT = 11 88 | DT_REL = 17 89 | DT_RELSZ = 18 90 | DT_RELENT = 19 91 | 92 | STB_LOCAL = 0 93 | STB_GLOBAL = 1 94 | STB_WEAK = 2 95 | 96 | STT_NOTYPE = 0 97 | STT_OBJECT = 1 98 | STT_FUNC = 2 99 | STT_SECTION = 3 100 | STT_FILE = 4 101 | 102 | R_386_NONE = 0 103 | R_386_32 = 1 104 | R_386_PC32 = 2 105 | R_386_GOT32 = 3 106 | R_386_PLT32 = 4 107 | R_386_COPY = 5 108 | R_386_GLOB_DAT = 6 109 | R_386_JMP_SLOT = 7 110 | R_386_RELATIVE = 8 111 | R_386_GOTOFF = 9 112 | R_386_GOTPC = 10 113 | 114 | R_X86_64_NONE = 0 115 | R_X86_64_64 = 1 116 | R_X86_64_PC32 = 2 117 | R_X86_64_GOT32 = 3 118 | R_X86_64_PLT32 = 4 119 | R_X86_64_COPY = 5 120 | R_X86_64_GLOB_DAT = 6 121 | R_X86_64_JUMP_SLOT = 7 122 | R_X86_64_RELATIVE = 8 123 | R_X86_64_GOTPCREL = 9 124 | R_X86_64_32 = 10 125 | R_X86_64_32S = 11 126 | R_X86_64_16 = 12 127 | R_X86_64_PC16 = 13 128 | R_X86_64_8 = 14 129 | R_X86_64_PC8 = 15 130 | R_X86_64_DPTMOD64 = 16 131 | R_X86_64_DTPOFF64 = 17 132 | R_X86_64_TPOFF64 = 18 133 | R_X86_64_TLSGD = 19 134 | R_X86_64_TLSLD = 20 135 | R_X86_64_DTPOFF32 = 21 136 | R_X86_64_GOTTPOFF = 22 137 | R_X86_64_TPOFF32 = 23 138 | R_X86_64_PC64 = 24 139 | R_X86_64_GOTOFF64 = 25 140 | R_X86_64_GOTPC32 = 26 141 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfexe/dynamic/hello -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/hello.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF executable 3 3 | entry start 4 | 5 | include 'import32.inc' 6 | include 'proc32.inc' 7 | 8 | interpreter '/lib/ld-linux.so.2' 9 | needed 'libc.so.6' 10 | import printf,exit 11 | 12 | segment readable executable 13 | 14 | start: 15 | cinvoke printf,msg 16 | cinvoke exit 17 | 18 | segment readable writeable 19 | 20 | msg db 'Hello world!',0xA,0 21 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/hello64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfexe/dynamic/hello64 -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/hello64.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF64 executable 3 3 | entry start 4 | 5 | include 'import64.inc' 6 | 7 | interpreter '/lib64/ld-linux-x86-64.so.2' 8 | needed 'libc.so.6' 9 | import printf,exit 10 | 11 | segment readable executable 12 | 13 | start: 14 | 15 | lea rdi,[msg] 16 | xor eax,eax 17 | call [printf] 18 | 19 | call [exit] 20 | 21 | segment readable writeable 22 | 23 | msg db 'Hello world!',0xA,0 24 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/import32.inc: -------------------------------------------------------------------------------- 1 | 2 | include 'elf.inc' 3 | 4 | macro interpreter [library] 5 | { 6 | segment interpreter readable 7 | db library,0 8 | } 9 | 10 | macro needed [library] 11 | { 12 | local str 13 | match needed,needed@dynamic \{ define needed@dynamic needed,str:library \} 14 | match ,needed@dynamic \{ define needed@dynamic str:library \} 15 | } 16 | define needed@dynamic 17 | 18 | macro import [name] 19 | { 20 | common 21 | local strtab,strsz,symtab,rel,relsz,hash 22 | segment dynamic readable 23 | match needed,needed@dynamic 24 | \{ irp item,needed \\{ match str:library,item \\\{ dd DT_NEEDED,str-strtab \\\} \\} \} 25 | dd DT_STRTAB,strtab 26 | dd DT_STRSZ,strsz 27 | dd DT_SYMTAB,symtab 28 | dd DT_SYMENT,sizeof.Elf32_Sym 29 | dd DT_REL,rel 30 | dd DT_RELSZ,relsz 31 | dd DT_RELENT,sizeof.Elf32_Rel 32 | dd DT_HASH,hash 33 | dd DT_NULL,0 34 | segment readable writeable 35 | symtab: Elf32_Sym 36 | forward 37 | local fstr 38 | Elf32_Sym fstr-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 39 | common 40 | rel: 41 | local counter 42 | counter = 1 43 | forward 44 | Elf32_Rel name,counter,R_386_32 45 | counter = counter+1 46 | common 47 | relsz = $-rel 48 | hash: 49 | dd 1,counter 50 | dd 0 51 | repeat counter 52 | if %=counter 53 | dd 0 54 | else 55 | dd % 56 | end if 57 | end repeat 58 | strtab db 0 59 | forward 60 | fstr db `name,0 61 | common 62 | match needed,needed@dynamic 63 | \{ irp item,needed \\{ match str:library,item \\\{ str db library,0 \\\} \\} \} 64 | strsz = $-strtab 65 | forward 66 | name dd 0 67 | } 68 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/dynamic/import64.inc: -------------------------------------------------------------------------------- 1 | 2 | include 'elf.inc' 3 | 4 | macro interpreter [library] 5 | { 6 | segment interpreter readable 7 | db library,0 8 | } 9 | 10 | macro needed [library] 11 | { 12 | local str 13 | match needed,needed@dynamic \{ define needed@dynamic needed,str:library \} 14 | match ,needed@dynamic \{ define needed@dynamic str:library \} 15 | } 16 | define needed@dynamic 17 | 18 | macro import [name] 19 | { 20 | common 21 | local strtab,strsz,symtab,rel,relsz,hash 22 | segment dynamic readable 23 | match needed,needed@dynamic 24 | \{ irp item,needed \\{ match str:library,item \\\{ dq DT_NEEDED,str-strtab \\\} \\} \} 25 | dq DT_STRTAB,strtab 26 | dq DT_STRSZ,strsz 27 | dq DT_SYMTAB,symtab 28 | dq DT_SYMENT,sizeof.Elf64_Sym 29 | dq DT_RELA,rela 30 | dq DT_RELASZ,relasz 31 | dq DT_RELAENT,sizeof.Elf64_Rela 32 | dq DT_HASH,hash 33 | dq DT_NULL,0 34 | segment readable writeable 35 | symtab: Elf64_Sym 36 | forward 37 | local fstr 38 | Elf64_Sym fstr-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0 39 | common 40 | rela: 41 | local counter 42 | counter = 1 43 | forward 44 | Elf64_Rela name,counter,R_X86_64_64 45 | counter = counter+1 46 | common 47 | relasz = $-rela 48 | hash: 49 | dd 1,counter 50 | dd 0 51 | repeat counter 52 | if %=counter 53 | dd 0 54 | else 55 | dd % 56 | end if 57 | end repeat 58 | strtab db 0 59 | forward 60 | fstr db `name,0 61 | common 62 | match needed,needed@dynamic 63 | \{ irp item,needed \\{ match str:library,item \\\{ str db library,0 \\\} \\} \} 64 | strsz = $-strtab 65 | forward 66 | name dq 0 67 | } 68 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfexe/hello -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/hello.asm: -------------------------------------------------------------------------------- 1 | 2 | ; fasm demonstration of writing simple ELF executable 3 | 4 | format ELF executable 3 5 | entry start 6 | 7 | segment readable executable 8 | 9 | start: 10 | 11 | mov eax,4 12 | mov ebx,1 13 | mov ecx,msg 14 | mov edx,msg_size 15 | int 0x80 16 | 17 | mov eax,1 18 | xor ebx,ebx 19 | int 0x80 20 | 21 | segment readable writeable 22 | 23 | msg db 'Hello world!',0xA 24 | msg_size = $-msg 25 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/hello64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfexe/hello64 -------------------------------------------------------------------------------- /programs/fasm/examples/elfexe/hello64.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfexe/hello64.asm -------------------------------------------------------------------------------- /programs/fasm/examples/elfobj/msgdemo.asm: -------------------------------------------------------------------------------- 1 | 2 | ; fasm demonstration of assembling object files 3 | 4 | ; compile the program using commands like: 5 | ; fasm msgdemo.asm msgdemo.o 6 | ; fasm writemsg.asm writemsg.o 7 | ; ld msgdemo.o writemsg.o -o msgdemo 8 | 9 | format ELF 10 | 11 | section '.text' executable 12 | 13 | public _start 14 | _start: 15 | 16 | extrn writemsg 17 | 18 | mov esi,msg 19 | call writemsg 20 | 21 | mov eax,1 22 | xor ebx,ebx 23 | int 0x80 24 | 25 | section '.data' writeable 26 | 27 | msg db "Elves are coming!",0xA,0 28 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfobj/msgdemo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfobj/msgdemo.o -------------------------------------------------------------------------------- /programs/fasm/examples/elfobj/writemsg.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | 4 | section '.text' executable 5 | 6 | public writemsg 7 | 8 | writemsg: 9 | mov ecx,esi 10 | find_end: 11 | lodsb 12 | or al,al 13 | jnz find_end 14 | mov edx,esi 15 | sub edx,ecx 16 | mov eax,4 17 | mov ebx,1 18 | int 0x80 19 | ret 20 | -------------------------------------------------------------------------------- /programs/fasm/examples/elfobj/writemsg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/elfobj/writemsg.o -------------------------------------------------------------------------------- /programs/fasm/examples/libcdemo/ccall.inc: -------------------------------------------------------------------------------- 1 | 2 | macro ccall proc,[arg] 3 | { common 4 | local size 5 | size = 0 6 | mov ebp,esp 7 | if ~ arg eq 8 | forward 9 | size = size + 4 10 | common 11 | sub esp,size 12 | end if 13 | and esp,-16 14 | if ~ arg eq 15 | add esp,size 16 | reverse 17 | pushd arg 18 | common 19 | end if 20 | call proc 21 | mov esp,ebp } 22 | 23 | -------------------------------------------------------------------------------- /programs/fasm/examples/libcdemo/libcdemo.asm: -------------------------------------------------------------------------------- 1 | 2 | ; fasm example of using the C library in Unix systems 3 | 4 | ; compile the source with commands like: 5 | ; fasm libcdemo.asm libcdemo.o 6 | ; gcc libcdemo.o -o libcdemo 7 | ; strip libcdemo 8 | 9 | format ELF 10 | 11 | include 'ccall.inc' 12 | 13 | section '.text' executable 14 | 15 | public main 16 | extrn printf 17 | extrn getpid 18 | 19 | main: 20 | call getpid 21 | ccall printf, msg,eax 22 | ret 23 | 24 | section '.data' writeable 25 | 26 | msg db "Current process ID is %d.",0xA,0 27 | -------------------------------------------------------------------------------- /programs/fasm/examples/libcdemo/libcdemo.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/examples/libcdemo/libcdemo.o -------------------------------------------------------------------------------- /programs/fasm/fasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/fasm -------------------------------------------------------------------------------- /programs/fasm/fasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/fasm.o -------------------------------------------------------------------------------- /programs/fasm/fasm.x64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/fasm.x64 -------------------------------------------------------------------------------- /programs/fasm/license.txt: -------------------------------------------------------------------------------- 1 | 2 | flat assembler version 1.73 3 | Copyright (c) 1999-2019, Tomasz Grysztar. 4 | All rights reserved. 5 | 6 | This program is free for commercial and non-commercial use as long as 7 | the following conditions are adhered to. 8 | 9 | Copyright remains Tomasz Grysztar, and as such any Copyright notices 10 | in the code are not to be removed. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are 14 | met: 15 | 16 | 1. Redistributions of source code must retain the above copyright notice, 17 | this list of conditions and the following disclaimer. 18 | 2. Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 25 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | The licence and distribution terms for any publically available 35 | version or derivative of this code cannot be changed. i.e. this code 36 | cannot simply be copied and put under another distribution licence 37 | (including the GNU Public Licence). 38 | -------------------------------------------------------------------------------- /programs/fasm/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | The fasm.o is an object file in ELF format. To get the final executable for 3 | your system, you need to use the appropriate tool to link it with the C 4 | library available on your platform. With the GNU tools it is enough to use 5 | this command: 6 | 7 | gcc fasm.o -o fasm 8 | -------------------------------------------------------------------------------- /programs/fasm/source/DOS/dpmi.inc: -------------------------------------------------------------------------------- 1 | 2 | ; flat assembler interface for DOS 3 | ; Copyright (c) 1999-2020, Tomasz Grysztar. 4 | ; All rights reserved. 5 | 6 | init_dpmi_memory: 7 | mov ax,500h ; get free memory information 8 | mov edi,[buffer_address] 9 | int 31h 10 | mov ebx,[edi] 11 | allocate_dpmi_memory: 12 | mov edx,[memory_setting] 13 | shl edx,10 14 | jz dpmi_memory_size_ok 15 | cmp ebx,edx 16 | jbe dpmi_memory_size_ok 17 | mov ebx,edx 18 | dpmi_memory_size_ok: 19 | mov [memory_end],ebx 20 | mov ecx,ebx 21 | shr ebx,16 22 | mov ax,501h 23 | int 31h 24 | jnc dpmi_memory_ok 25 | mov ebx,[memory_end] 26 | shr ebx,1 27 | cmp ebx,4000h 28 | jb out_of_memory 29 | jmp allocate_dpmi_memory 30 | dpmi_memory_ok: 31 | shl ebx,16 32 | mov bx,cx 33 | sub ebx,[program_base] 34 | jc out_of_memory 35 | mov [memory_start],ebx 36 | add [memory_end],ebx 37 | mov ax,100h ; get free conventional memory size 38 | mov bx,-1 39 | int 31h 40 | movzx ecx,bx 41 | shl ecx,4 42 | jecxz no_conventional_memory 43 | mov ax,100h ; allocate all conventional memory 44 | int 31h 45 | movzx edi,ax 46 | shl edi,4 47 | sub edi,[program_base] 48 | jc no_conventional_memory 49 | mov [additional_memory],edi 50 | mov [additional_memory_end],edi 51 | add [additional_memory_end],ecx 52 | mov eax,[memory_end] 53 | sub eax,[memory_start] 54 | shr eax,2 55 | cmp eax,ecx 56 | ja no_conventional_memory 57 | ret 58 | no_conventional_memory: 59 | mov eax,[memory_end] 60 | mov ebx,[memory_start] 61 | sub eax,ebx 62 | shr eax,2 63 | mov [additional_memory],ebx 64 | add ebx,eax 65 | mov [additional_memory_end],ebx 66 | mov [memory_start],ebx 67 | ret 68 | 69 | dpmi_dos_int: 70 | mov [real_mode_segment],main 71 | simulate_real_mode: 72 | push 0 ; SS:SP (DPMI will allocate stack) 73 | push 0 ; CS:IP (ignored) 74 | push 0 75 | push [real_mode_segment] ; DS 76 | push [real_mode_segment] ; ES 77 | stc 78 | pushfw 79 | push eax 80 | push ecx 81 | push edx 82 | push ebx 83 | push 0 84 | push ebp 85 | push esi 86 | push edi 87 | mov ax,300h 88 | mov bx,21h 89 | xor cx,cx 90 | mov edi,esp 91 | push es ss 92 | pop es 93 | int 31h 94 | pop es 95 | mov edi,[esp] 96 | mov esi,[esp+4] 97 | mov ebp,[esp+8] 98 | mov ebx,[esp+10h] 99 | mov edx,[esp+14h] 100 | mov ecx,[esp+18h] 101 | mov ah,[esp+20h] 102 | sahf 103 | mov eax,[esp+1Ch] 104 | lea esp,[esp+32h] 105 | ret 106 | dpmi_dos_int_with_buffer: 107 | mov [real_mode_segment],buffer 108 | jmp simulate_real_mode 109 | -------------------------------------------------------------------------------- /programs/fasm/source/Linux/fasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/source/Linux/fasm -------------------------------------------------------------------------------- /programs/fasm/source/Linux/x64/modes.inc: -------------------------------------------------------------------------------- 1 | 2 | ; flat assembler interface for Linux x64 3 | ; Copyright (c) 1999-2020, Tomasz Grysztar. 4 | ; All rights reserved. 5 | 6 | esp equ +rsp 7 | 8 | macro pushD [arg] 9 | { 10 | common 11 | local offset,total 12 | offset = 0 13 | lea rsp,[rsp-total] 14 | forward 15 | offset = offset + 4 16 | if arg eqtype eax 17 | mov dword [rsp+total-offset],arg 18 | else 19 | mov r8d,dword arg 20 | mov [rsp+total-offset],r8d 21 | end if 22 | common 23 | total = offset 24 | } 25 | 26 | macro popD [arg] 27 | { 28 | common 29 | local offset 30 | offset = 0 31 | forward 32 | if arg eqtype [mem] 33 | mov r8d,[rsp+offset] 34 | mov dword arg,r8d 35 | else 36 | mov arg,dword [rsp+offset] 37 | end if 38 | offset = offset + 4 39 | common 40 | lea rsp,[rsp+offset] 41 | } 42 | 43 | macro add dest,src 44 | { 45 | if dest eq esp 46 | add rsp,src 47 | else 48 | add dest,src 49 | end if 50 | } 51 | 52 | macro mov dest,src 53 | { 54 | if src eq esp 55 | mov dest,ESP 56 | else 57 | mov dest,src 58 | end if 59 | } 60 | 61 | macro cmp dest,src 62 | { 63 | if dest eq esp 64 | cmp ESP,src 65 | else 66 | cmp dest,src 67 | end if 68 | } 69 | 70 | macro use32 71 | { 72 | 73 | macro push args 74 | \{ 75 | local list,arg,status 76 | define list 77 | define arg 78 | irps sym, args \\{ 79 | define status 80 | match =dword, sym \\\{ 81 | define status : 82 | \\\} 83 | match [any, status arg sym \\\{ 84 | define arg [any 85 | match [mem], arg \\\\{ 86 | match previous, list \\\\\{ define list previous,[mem] \\\\\} 87 | match , list \\\\\{ define list [mem] \\\\\} 88 | define arg 89 | \\\\} 90 | define status : 91 | \\\} 92 | match [, status arg sym \\\{ 93 | define arg [ 94 | define status : 95 | \\\} 96 | match , status \\\{ 97 | match previous, list \\\\{ define list previous,sym \\\\} 98 | match , list \\\\{ define list sym \\\\} 99 | \\\} 100 | \\} 101 | match arg, list \\{ pushD arg \\} 102 | \} 103 | 104 | macro pop args 105 | \{ 106 | local list,arg,status 107 | define list 108 | define arg 109 | irps sym, args \\{ 110 | define status 111 | match =dword, sym \\\{ 112 | define status : 113 | \\\} 114 | match [any, status arg sym \\\{ 115 | define arg [any 116 | match [mem], arg \\\\{ 117 | match previous, list \\\\\{ define list previous,[mem] \\\\\} 118 | match , list \\\\\{ define list [mem] \\\\\} 119 | define arg 120 | \\\\} 121 | define status : 122 | \\\} 123 | match [, status arg sym \\\{ 124 | define arg [ 125 | define status : 126 | \\\} 127 | match , status \\\{ 128 | match previous, list \\\\{ define list previous,sym \\\\} 129 | match , list \\\\{ define list sym \\\\} 130 | \\\} 131 | \\} 132 | match arg, list \\{ popD arg \\} 133 | \} 134 | 135 | macro jmp arg 136 | \{ 137 | if arg eq near eax 138 | jmp near rax 139 | else if arg eq near edx 140 | jmp near rdx 141 | else if arg eqtype [mem] 142 | mov r8d,arg 143 | jmp near r8 144 | else 145 | jmp arg 146 | end if 147 | \} 148 | 149 | macro call arg 150 | \{ 151 | if 1 152 | match =near =dword [mem], arg \\{ 153 | mov r8d,[mem] 154 | call near r8 155 | else 156 | \\} 157 | call arg 158 | end if 159 | \} 160 | 161 | macro salc ; for fasm's core it does not need to preserve flags 162 | \{ 163 | setc al 164 | neg al 165 | \} 166 | 167 | macro jcxz target ; for fasm's core it does not need to preserve flags 168 | \{ 169 | test cx,cx 170 | jz target 171 | \} 172 | 173 | use64 174 | 175 | } 176 | 177 | macro use16 178 | { 179 | 180 | purge push,pop,jmp,call,salc,jcxz 181 | 182 | use16 183 | 184 | } 185 | 186 | use32 187 | -------------------------------------------------------------------------------- /programs/fasm/source/SoS/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash # tell what we are 2 | fasm fasm.asm core.o || exit # compile fasm core 3 | fasm startup.asm startup.o || exit # compile bootstrap 4 | gcc -T linker.ld -o fasm -m32 -ffreestanding -O2 -nostdlib startup.o core.o ../../../../lib/user32.o || exit # link bridge 5 | rm *.o # remove any objects -------------------------------------------------------------------------------- /programs/fasm/source/SoS/fasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/fasm/source/SoS/fasm -------------------------------------------------------------------------------- /programs/fasm/source/SoS/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_start) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 2M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.text) 19 | } 20 | 21 | /* Read-only data. */ 22 | .rodata BLOCK(4K) : ALIGN(4K) 23 | { 24 | *(.rodata) 25 | } 26 | 27 | /* Read-write data (initialized) */ 28 | .data BLOCK(4K) : ALIGN(4K) 29 | { 30 | *(.data) 31 | } 32 | 33 | /* Read-write data (uninitialized) and stack */ 34 | .bss BLOCK(4K) : ALIGN(4K) 35 | { 36 | *(COMMON) 37 | *(.bss) 38 | } 39 | 40 | /* The compiler may produce other sections, by default it will put them in 41 | a segment with the same name. Simply add stuff here as needed. */ 42 | } 43 | -------------------------------------------------------------------------------- /programs/fasm/source/SoS/startup.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Requires the SoS Development Kit 3 | ; 4 | 5 | format ELF 6 | public _start 7 | extrn main 8 | 9 | section '.text' executable 10 | 11 | _start: 12 | ; push _char_c 13 | ; push 5 14 | ; get params 15 | mov eax,0xCB 16 | int 0x80 17 | push eax 18 | push ebx 19 | ; call main 20 | call main 21 | ; quit 22 | mov eax,0x01 23 | int 0x80 24 | ret 25 | 26 | filenamebuffer: db 'A@PRGS/TEGT.ASM', 0 27 | fileoutbuffer: db 'A@PRGS/TEGT.BIN', 0 28 | fasm: db './fasm', 0 29 | dashm: db '-m', 0 30 | ten: db '10', 0 31 | _char_c dd fasm, filenamebuffer, fileoutbuffer, dashm, ten -------------------------------------------------------------------------------- /programs/fasm/source/messages.inc: -------------------------------------------------------------------------------- 1 | 2 | ; flat assembler core 3 | ; Copyright (c) 1999-2020, Tomasz Grysztar. 4 | ; All rights reserved. 5 | 6 | _out_of_memory db 'out of memory',0 7 | _stack_overflow db 'out of stack space',0 8 | _main_file_not_found db 'source file not found',0 9 | _unexpected_end_of_file db 'unexpected end of file',0 10 | _code_cannot_be_generated db 'code cannot be generated',0 11 | _format_limitations_exceeded db 'format limitations exceeded',0 12 | _invalid_definition db 'invalid definition provided',0 13 | _write_failed db 'write failed',0 14 | _file_not_found db 'file not found',0 15 | _error_reading_file db 'error reading file',0 16 | _invalid_file_format db 'invalid file format',0 17 | _invalid_macro_arguments db 'invalid macro arguments',0 18 | _incomplete_macro db 'incomplete macro',0 19 | _unexpected_characters db 'unexpected characters',0 20 | _invalid_argument db 'invalid argument',0 21 | _illegal_instruction db 'illegal instruction',0 22 | _invalid_operand db 'invalid operand',0 23 | _invalid_operand_size db 'invalid size of operand',0 24 | _operand_size_not_specified db 'operand size not specified',0 25 | _operand_sizes_do_not_match db 'operand sizes do not match',0 26 | _invalid_address_size db 'invalid size of address value',0 27 | _address_sizes_do_not_agree db 'address sizes do not agree',0 28 | _disallowed_combination_of_registers db 'disallowed combination of registers',0 29 | _long_immediate_not_encodable db 'not encodable with long immediate',0 30 | _relative_jump_out_of_range db 'relative jump out of range',0 31 | _invalid_expression db 'invalid expression',0 32 | _invalid_address db 'invalid address',0 33 | _invalid_value db 'invalid value',0 34 | _value_out_of_range db 'value out of range',0 35 | _undefined_symbol db 'undefined symbol',0 36 | _symbol_out_of_scope_1 db 'symbol',0 37 | _symbol_out_of_scope_2 db 'out of scope',0 38 | _invalid_use_of_symbol db 'invalid use of symbol',0 39 | _name_too_long db 'name too long',0 40 | _invalid_name db 'invalid name',0 41 | _reserved_word_used_as_symbol db 'reserved word used as symbol',0 42 | _symbol_already_defined db 'symbol already defined',0 43 | _missing_end_quote db 'missing end quote',0 44 | _missing_end_directive db 'missing end directive',0 45 | _unexpected_instruction db 'unexpected instruction',0 46 | _extra_characters_on_line db 'extra characters on line',0 47 | _section_not_aligned_enough db 'section is not aligned enough',0 48 | _setting_already_specified db 'setting already specified',0 49 | _data_already_defined db 'data already defined',0 50 | _too_many_repeats db 'too many repeats',0 51 | _invoked_error db 'error directive encountered in source file',0 52 | _assertion_failed db 'assertion failed',0 53 | -------------------------------------------------------------------------------- /programs/fasm/source/variable.inc: -------------------------------------------------------------------------------- 1 | 2 | ; flat assembler core variables 3 | ; Copyright (c) 1999-2020, Tomasz Grysztar. 4 | ; All rights reserved. 5 | 6 | ; Variables which have to be set up by interface: 7 | 8 | memory_start dd ? 9 | memory_end dd ? 10 | 11 | additional_memory dd ? 12 | additional_memory_end dd ? 13 | 14 | stack_limit dd ? 15 | 16 | initial_definitions dd ? 17 | input_file dd ? 18 | output_file dd ? 19 | symbols_file dd ? 20 | 21 | passes_limit dw ? 22 | 23 | ; Internal core variables: 24 | 25 | current_pass dw ? 26 | 27 | include_paths dd ? 28 | free_additional_memory dd ? 29 | source_start dd ? 30 | code_start dd ? 31 | code_size dd ? 32 | real_code_size dd ? 33 | written_size dd ? 34 | headers_size dd ? 35 | 36 | current_line dd ? 37 | macro_line dd ? 38 | macro_block dd ? 39 | macro_block_line dd ? 40 | macro_block_line_number dd ? 41 | macro_symbols dd ? 42 | struc_name dd ? 43 | struc_label dd ? 44 | instant_macro_start dd ? 45 | parameters_end dd ? 46 | default_argument_value dd ? 47 | locals_counter rb 8 48 | current_locals_prefix dd ? 49 | anonymous_reverse dd ? 50 | anonymous_forward dd ? 51 | labels_list dd ? 52 | label_hash dd ? 53 | label_leaf dd ? 54 | hash_tree dd ? 55 | addressing_space dd ? 56 | undefined_data_start dd ? 57 | undefined_data_end dd ? 58 | counter dd ? 59 | counter_limit dd ? 60 | error_info dd ? 61 | error_line dd ? 62 | error dd ? 63 | tagged_blocks dd ? 64 | structures_buffer dd ? 65 | number_start dd ? 66 | current_offset dd ? 67 | value dq ? 68 | fp_value rd 8 69 | adjustment dq ? 70 | symbol_identifier dd ? 71 | address_symbol dd ? 72 | address_high dd ? 73 | uncompressed_displacement dd ? 74 | format_flags dd ? 75 | resolver_flags dd ? 76 | symbols_stream dd ? 77 | number_of_relocations dd ? 78 | number_of_sections dd ? 79 | stub_size dd ? 80 | stub_file dd ? 81 | current_section dd ? 82 | machine dw ? 83 | subsystem dw ? 84 | subsystem_version dd ? 85 | image_base dd ? 86 | image_base_high dd ? 87 | merge_segment dd ? 88 | resource_data dd ? 89 | resource_size dd ? 90 | actual_fixups_size dd ? 91 | reserved_fixups dd ? 92 | reserved_fixups_size dd ? 93 | last_fixup_base dd ? 94 | last_fixup_header dd ? 95 | parenthesis_stack dd ? 96 | blocks_stack dd ? 97 | parsed_lines dd ? 98 | logical_value_parentheses dd ? 99 | file_extension dd ? 100 | 101 | operand_size db ? 102 | operand_flags db ? 103 | operand_prefix db ? 104 | rex_prefix db ? 105 | opcode_prefix db ? 106 | vex_required db ? 107 | vex_register db ? 108 | immediate_size db ? 109 | mask_register db ? 110 | broadcast_size db ? 111 | rounding_mode db ? 112 | 113 | base_code db ? 114 | extended_code db ? 115 | supplemental_code db ? 116 | postbyte_register db ? 117 | segment_register db ? 118 | xop_opcode_map db ? 119 | 120 | mmx_size db ? 121 | jump_type db ? 122 | push_size db ? 123 | value_size db ? 124 | address_size db ? 125 | label_size db ? 126 | size_declared db ? 127 | address_size_declared db ? 128 | displacement_compression db ? 129 | 130 | value_undefined db ? 131 | value_constant db ? 132 | value_type db ? 133 | value_sign db ? 134 | fp_sign db ? 135 | fp_format db ? 136 | address_sign db ? 137 | address_register db ? 138 | compare_type db ? 139 | logical_value_wrapping db ? 140 | next_pass_needed db ? 141 | output_format db ? 142 | code_type db ? 143 | adjustment_sign db ? 144 | evex_mode db ? 145 | 146 | macro_status db ? 147 | skip_default_argument_value db ? 148 | prefix_flags db ? 149 | formatter_symbols_allowed db ? 150 | decorator_symbols_allowed db ? 151 | free_address_range db ? 152 | 153 | characters rb 100h 154 | converted rb 100h 155 | message rb 180h -------------------------------------------------------------------------------- /programs/fasm/source/version.inc: -------------------------------------------------------------------------------- 1 | 2 | ; flat assembler version 1.73 3 | ; Copyright (c) 1999-2020, Tomasz Grysztar. 4 | ; All rights reserved. 5 | ; 6 | ; This programs is free for commercial and non-commercial use as long as 7 | ; the following conditions are adhered to. 8 | ; 9 | ; Redistribution and use in source and binary forms, with or without 10 | ; modification, are permitted provided that the following conditions are 11 | ; met: 12 | ; 13 | ; 1. Redistributions of source code must retain the above copyright notice, 14 | ; this list of conditions and the following disclaimer. 15 | ; 2. Redistributions in binary form must reproduce the above copyright 16 | ; notice, this list of conditions and the following disclaimer in the 17 | ; documentation and/or other materials provided with the distribution. 18 | ; 19 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 | ; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 22 | ; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 23 | ; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | ; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | ; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | ; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | ; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | ; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | ; 31 | ; The licence and distribution terms for any publically available 32 | ; version or derivative of this code cannot be changed. i.e. this code 33 | ; cannot simply be copied and put under another distribution licence 34 | ; (including the GNU Public Licence). 35 | 36 | VERSION_STRING equ "1.73.25" 37 | 38 | VERSION_MAJOR = 1 39 | VERSION_MINOR = 73 40 | -------------------------------------------------------------------------------- /programs/fasm/tools/dos/loader.inc: -------------------------------------------------------------------------------- 1 | 2 | segment loader use16 3 | 4 | init: 5 | 6 | mov ax,1687h 7 | int 2Fh 8 | or ax,ax ; DPMI installed? 9 | jnz short no_dpmi 10 | test bl,1 ; 32-bit programs supported? 11 | jz short no_dpmi 12 | mov word [cs:mode_switch],di 13 | mov word [cs:mode_switch+2],es 14 | mov bx,si ; allocate memory for DPMI data 15 | mov ah,48h 16 | int 21h 17 | jnc init_protected_mode 18 | init_failed: 19 | call init_error 20 | db 'error: DPMI initialization failed.',0Dh,0Ah,0 21 | no_dpmi: 22 | call init_error 23 | db 'error: 32-bit DPMI services are not available.',0Dh,0Ah,0 24 | init_error: 25 | pop si 26 | push cs 27 | pop ds 28 | display_error: 29 | lodsb 30 | test al,al 31 | jz short error_finish 32 | mov dl,al 33 | mov ah,2 34 | int 21h 35 | jmp short display_error 36 | error_finish: 37 | mov ax,4CFFh 38 | int 21h 39 | init_protected_mode: 40 | mov es,ax 41 | mov ds,[ds:2Ch] 42 | mov ax,1 43 | call far [cs:mode_switch] ; switch to protected mode 44 | jc init_failed 45 | mov cx,1 46 | xor ax,ax 47 | int 31h ; allocate descriptor for code 48 | jc init_failed 49 | mov si,ax 50 | xor ax,ax 51 | int 31h ; allocate descriptor for data 52 | jc init_failed 53 | mov di,ax 54 | mov dx,cs 55 | lar cx,dx 56 | shr cx,8 57 | or cx,0C000h 58 | mov bx,si 59 | mov ax,9 60 | int 31h ; set code descriptor access rights 61 | jc init_failed 62 | mov dx,ds 63 | lar cx,dx 64 | shr cx,8 65 | or cx,0C000h 66 | mov bx,di 67 | int 31h ; set data descriptor access rights 68 | jc init_failed 69 | mov ecx,main 70 | shl ecx,4 71 | mov dx,cx 72 | shr ecx,16 73 | mov ax,7 74 | int 31h ; set data descriptor base address 75 | jc init_failed 76 | mov bx,si 77 | int 31h ; set code descriptor base address 78 | jc init_failed 79 | mov cx,0FFFFh 80 | mov dx,0FFFFh 81 | mov ax,8 ; set segment limit to 4 GB 82 | int 31h 83 | jc init_failed 84 | mov bx,di 85 | int 31h 86 | jc init_failed 87 | mov ax,ds 88 | mov ds,di 89 | mov [psp_selector],es 90 | mov [environment_selector],ax 91 | cli 92 | mov ss,di 93 | mov esp,stack_top 94 | sti 95 | mov es,di 96 | xor eax,eax 97 | mov [memory_handles_count],eax 98 | push si 99 | push start 100 | retf 101 | 102 | mode_switch dd ? 103 | -------------------------------------------------------------------------------- /programs/fasm/tools/dos/prepsrc.asm: -------------------------------------------------------------------------------- 1 | 2 | format MZ 3 | heap 0 4 | stack 8000h 5 | entry loader:init 6 | 7 | include 'loader.inc' 8 | 9 | segment main use32 10 | 11 | start: 12 | 13 | call get_params 14 | jnc make_dump 15 | 16 | mov esi,_usage 17 | call display_string 18 | mov ax,4C02h 19 | int 21h 20 | 21 | make_dump: 22 | call preprocessed_source 23 | mov ax,4C00h 24 | int 21h 25 | 26 | error: 27 | mov esi,_error_prefix 28 | call display_string 29 | pop esi 30 | call display_string 31 | mov esi,_error_suffix 32 | call display_string 33 | mov ax,4C00h 34 | int 21h 35 | 36 | get_params: 37 | push ds 38 | mov ds,[psp_selector] 39 | mov esi,81h 40 | mov edi,params 41 | find_param: 42 | lodsb 43 | cmp al,20h 44 | je find_param 45 | cmp al,0Dh 46 | je all_params 47 | or al,al 48 | jz all_params 49 | cmp [es:input_file],0 50 | jne get_output_file 51 | mov [es:input_file],edi 52 | jmp process_param 53 | get_output_file: 54 | cmp [es:output_file],0 55 | jne bad_params 56 | mov [es:output_file],edi 57 | process_param: 58 | cmp al,22h 59 | je string_param 60 | copy_param: 61 | stosb 62 | lodsb 63 | cmp al,20h 64 | je param_end 65 | cmp al,0Dh 66 | je param_end 67 | or al,al 68 | jz param_end 69 | jmp copy_param 70 | string_param: 71 | lodsb 72 | cmp al,22h 73 | je string_param_end 74 | cmp al,0Dh 75 | je param_end 76 | or al,al 77 | jz param_end 78 | stosb 79 | jmp string_param 80 | bad_params_value: 81 | stc 82 | ret 83 | param_end: 84 | dec esi 85 | string_param_end: 86 | xor al,al 87 | stosb 88 | jmp find_param 89 | all_params: 90 | xor al,al 91 | stosb 92 | pop ds 93 | cmp [input_file],0 94 | je bad_params 95 | cmp [output_file],0 96 | je bad_params 97 | clc 98 | ret 99 | bad_params: 100 | stc 101 | ret 102 | 103 | include 'system.inc' 104 | 105 | include '..\prepsrc.inc' 106 | 107 | _usage db 'preprocessed source dumper for flat assembler',0Dh,0Ah 108 | db 'usage: prepsrc ',0Dh,0Ah 109 | db 0 110 | _error_prefix db 'error: ',0 111 | _error_suffix db '.',0Dh,0Ah,0 112 | 113 | input_file dd 0 114 | output_file dd 0 115 | 116 | psp_selector dw ? 117 | environment_selector dw ? 118 | 119 | memory_handles_count dd ? 120 | memory_handles rd 400h 121 | 122 | params rb 1000h 123 | 124 | segment buffer_segment 125 | 126 | buffer = (buffer_segment-main) shl 4 127 | 128 | db 1000h dup ? 129 | 130 | segment stack_segment 131 | 132 | stack_bottom = (stack_segment-main) shl 4 133 | 134 | db 4000h dup ? 135 | 136 | stack_top = stack_bottom + $ 137 | -------------------------------------------------------------------------------- /programs/fasm/tools/dos/symbols.asm: -------------------------------------------------------------------------------- 1 | 2 | format MZ 3 | heap 0 4 | stack 8000h 5 | entry loader:init 6 | 7 | include 'loader.inc' 8 | 9 | segment main use32 10 | 11 | start: 12 | 13 | call get_params 14 | jnc make_dump 15 | 16 | mov esi,_usage 17 | call display_string 18 | mov ax,4C02h 19 | int 21h 20 | 21 | make_dump: 22 | call symbols 23 | mov ax,4C00h 24 | int 21h 25 | 26 | error: 27 | mov esi,_error_prefix 28 | call display_string 29 | pop esi 30 | call display_string 31 | mov esi,_error_suffix 32 | call display_string 33 | mov ax,4C00h 34 | int 21h 35 | 36 | get_params: 37 | push ds 38 | mov ds,[psp_selector] 39 | mov esi,81h 40 | mov edi,params 41 | find_param: 42 | lodsb 43 | cmp al,20h 44 | je find_param 45 | cmp al,0Dh 46 | je all_params 47 | or al,al 48 | jz all_params 49 | cmp [es:input_file],0 50 | jne get_output_file 51 | mov [es:input_file],edi 52 | jmp process_param 53 | get_output_file: 54 | cmp [es:output_file],0 55 | jne bad_params 56 | mov [es:output_file],edi 57 | process_param: 58 | cmp al,22h 59 | je string_param 60 | copy_param: 61 | stosb 62 | lodsb 63 | cmp al,20h 64 | je param_end 65 | cmp al,0Dh 66 | je param_end 67 | or al,al 68 | jz param_end 69 | jmp copy_param 70 | string_param: 71 | lodsb 72 | cmp al,22h 73 | je string_param_end 74 | cmp al,0Dh 75 | je param_end 76 | or al,al 77 | jz param_end 78 | stosb 79 | jmp string_param 80 | bad_params_value: 81 | stc 82 | ret 83 | param_end: 84 | dec esi 85 | string_param_end: 86 | xor al,al 87 | stosb 88 | jmp find_param 89 | all_params: 90 | xor al,al 91 | stosb 92 | pop ds 93 | cmp [input_file],0 94 | je bad_params 95 | cmp [output_file],0 96 | je bad_params 97 | clc 98 | ret 99 | bad_params: 100 | stc 101 | ret 102 | 103 | include 'system.inc' 104 | 105 | include '..\symbols.inc' 106 | 107 | _usage db 'symbols dumper for flat assembler',0Dh,0Ah 108 | db 'usage: symbols ',0Dh,0Ah 109 | db 0 110 | _error_prefix db 'error: ',0 111 | _error_suffix db '.',0Dh,0Ah,0 112 | 113 | input_file dd 0 114 | output_file dd 0 115 | 116 | input dd ? 117 | output_buffer dd ? 118 | output_handle dd ? 119 | 120 | psp_selector dw ? 121 | environment_selector dw ? 122 | 123 | memory_handles_count dd ? 124 | memory_handles rd 400h 125 | 126 | params rb 1000h 127 | 128 | segment buffer_segment 129 | 130 | buffer = (buffer_segment-main) shl 4 131 | 132 | db 1000h dup ? 133 | 134 | segment stack_segment 135 | 136 | stack_bottom = (stack_segment-main) shl 4 137 | 138 | db 4000h dup ? 139 | 140 | stack_top = stack_bottom + $ 141 | -------------------------------------------------------------------------------- /programs/fasm/tools/libc/ccall.inc: -------------------------------------------------------------------------------- 1 | 2 | macro ccall proc,[arg] 3 | { common 4 | push ebp 5 | mov ebp,esp 6 | local size 7 | size = 0 8 | if ~ arg eq 9 | forward 10 | size = size + 4 11 | common 12 | sub esp,size 13 | end if 14 | and esp,-16 15 | if ~ arg eq 16 | add esp,size 17 | reverse 18 | pushd arg 19 | common 20 | end if 21 | call proc 22 | leave } 23 | 24 | -------------------------------------------------------------------------------- /programs/fasm/tools/libc/listing.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | public main 4 | 5 | include 'ccall.inc' 6 | 7 | section '.text' executable align 16 8 | 9 | main: 10 | mov ecx,[esp+4] 11 | mov [argc],ecx 12 | mov ebx,[esp+8] 13 | mov [argv],ebx 14 | 15 | mov [display_handle],1 16 | 17 | call get_params 18 | jnc make_listing 19 | 20 | mov esi,_usage 21 | call display_string 22 | ccall exit,2 23 | 24 | make_listing: 25 | call listing 26 | ccall exit,0 27 | 28 | error: 29 | mov [display_handle],2 30 | mov esi,_error_prefix 31 | call display_string 32 | pop esi 33 | call display_string 34 | mov esi,_error_suffix 35 | call display_string 36 | ccall exit,0 37 | 38 | get_params: 39 | mov ecx,[argc] 40 | mov ebx,[argv] 41 | add ebx,4 42 | dec ecx 43 | jz bad_params 44 | get_param: 45 | mov esi,[ebx] 46 | mov al,[esi] 47 | cmp al,'-' 48 | je option_param 49 | cmp [input_file],0 50 | jne get_output_file 51 | mov [input_file],esi 52 | jmp next_param 53 | get_output_file: 54 | cmp [output_file],0 55 | jne bad_params 56 | mov [output_file],esi 57 | jmp next_param 58 | option_param: 59 | inc esi 60 | lodsb 61 | cmp al,'a' 62 | je addresses_option 63 | cmp al,'A' 64 | je addresses_option 65 | cmp al,'b' 66 | je bytes_per_line_option 67 | cmp al,'B' 68 | je bytes_per_line_option 69 | bad_params: 70 | stc 71 | ret 72 | addresses_option: 73 | cmp byte [esi],0 74 | jne bad_params 75 | mov [show_addresses],1 76 | jmp next_param 77 | bytes_per_line_option: 78 | cmp byte [esi],0 79 | jne get_bytes_per_line_setting 80 | dec ecx 81 | jz bad_params 82 | add ebx,4 83 | mov esi,[ebx] 84 | get_bytes_per_line_setting: 85 | call get_option_value 86 | or edx,edx 87 | jz bad_params 88 | cmp edx,1000 89 | ja bad_params 90 | mov [code_bytes_per_line],edx 91 | next_param: 92 | add ebx,4 93 | dec ecx 94 | jnz get_param 95 | cmp [input_file],0 96 | je bad_params 97 | cmp [output_file],0 98 | je bad_params 99 | clc 100 | ret 101 | get_option_value: 102 | xor eax,eax 103 | mov edx,eax 104 | get_option_digit: 105 | lodsb 106 | cmp al,20h 107 | je option_value_ok 108 | cmp al,0Dh 109 | je option_value_ok 110 | or al,al 111 | jz option_value_ok 112 | sub al,30h 113 | jc invalid_option_value 114 | cmp al,9 115 | ja invalid_option_value 116 | imul edx,10 117 | jo invalid_option_value 118 | add edx,eax 119 | jc invalid_option_value 120 | jmp get_option_digit 121 | option_value_ok: 122 | dec esi 123 | clc 124 | ret 125 | invalid_option_value: 126 | stc 127 | ret 128 | 129 | include 'system.inc' 130 | 131 | include '..\listing.inc' 132 | 133 | section '.data' writeable align 4 134 | 135 | input_file dd 0 136 | output_file dd 0 137 | code_bytes_per_line dd 16 138 | show_addresses db 0 139 | 140 | line_break db 0Dh,0Ah 141 | 142 | _usage db 'listing generator for flat assembler',0Dh,0Ah 143 | db 'usage: listing ',0Dh,0Ah 144 | db 'optional settings:',0Dh,0Ah 145 | db ' -a show target addresses for assembled code',0Dh,0Ah 146 | db ' -b set the amount of bytes listed per line',0Dh,0Ah 147 | db 0 148 | _error_prefix db 'error: ',0 149 | _error_suffix db '.',0Dh,0Ah,0 150 | 151 | section '.bss' writeable align 4 152 | 153 | argc dd ? 154 | argv dd ? 155 | 156 | input dd ? 157 | assembled_code dd ? 158 | assembled_code_length dd ? 159 | code_end dd ? 160 | code_offset dd ? 161 | code_length dd ? 162 | output_handle dd ? 163 | output_buffer dd ? 164 | current_source_file dd ? 165 | current_source_line dd ? 166 | source dd ? 167 | source_length dd ? 168 | maximum_address_length dd ? 169 | address_start dd ? 170 | last_listed_address dd ? 171 | 172 | display_handle dd ? 173 | character db ? 174 | 175 | params rb 1000h 176 | characters rb 100h 177 | buffer rb 1000h 178 | -------------------------------------------------------------------------------- /programs/fasm/tools/libc/prepsrc.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | public main 4 | 5 | include 'ccall.inc' 6 | 7 | section '.text' executable align 16 8 | 9 | main: 10 | mov ecx,[esp+4] 11 | mov [argc],ecx 12 | mov ebx,[esp+8] 13 | mov [argv],ebx 14 | 15 | mov [display_handle],1 16 | 17 | call get_params 18 | jnc make_dump 19 | 20 | mov esi,_usage 21 | call display_string 22 | ccall exit,2 23 | 24 | make_dump: 25 | call preprocessed_source 26 | ccall exit,0 27 | 28 | error: 29 | mov [display_handle],2 30 | mov esi,_error_prefix 31 | call display_string 32 | pop esi 33 | call display_string 34 | mov esi,_error_suffix 35 | call display_string 36 | ccall exit,0 37 | 38 | get_params: 39 | mov ecx,[argc] 40 | mov ebx,[argv] 41 | add ebx,4 42 | dec ecx 43 | jz bad_params 44 | get_param: 45 | mov esi,[ebx] 46 | mov al,[esi] 47 | cmp [input_file],0 48 | jne get_output_file 49 | mov [input_file],esi 50 | jmp next_param 51 | get_output_file: 52 | cmp [output_file],0 53 | jne bad_params 54 | mov [output_file],esi 55 | jmp next_param 56 | bad_params: 57 | stc 58 | ret 59 | next_param: 60 | add ebx,4 61 | dec ecx 62 | jnz get_param 63 | cmp [input_file],0 64 | je bad_params 65 | cmp [output_file],0 66 | je bad_params 67 | clc 68 | ret 69 | 70 | include 'system.inc' 71 | 72 | include '..\prepsrc.inc' 73 | 74 | section '.data' writeable align 4 75 | 76 | input_file dd 0 77 | output_file dd 0 78 | 79 | _usage db 'preprocessed source dumper for flat assembler',0Dh,0Ah 80 | db 'usage: prepsrc ',0Dh,0Ah 81 | db 0 82 | _error_prefix db 'error: ',0 83 | _error_suffix db '.',0Dh,0Ah,0 84 | 85 | section '.bss' writeable align 4 86 | 87 | argc dd ? 88 | argv dd ? 89 | 90 | display_handle dd ? 91 | character db ? 92 | 93 | params rb 1000h 94 | buffer rb 1000h 95 | -------------------------------------------------------------------------------- /programs/fasm/tools/libc/symbols.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | public main 4 | 5 | include 'ccall.inc' 6 | 7 | section '.text' executable align 16 8 | 9 | main: 10 | mov ecx,[esp+4] 11 | mov [argc],ecx 12 | mov ebx,[esp+8] 13 | mov [argv],ebx 14 | 15 | mov [display_handle],1 16 | 17 | call get_params 18 | jnc make_dump 19 | 20 | mov esi,_usage 21 | call display_string 22 | ccall exit,2 23 | 24 | make_dump: 25 | call symbols 26 | ccall exit,0 27 | 28 | error: 29 | mov [display_handle],2 30 | mov esi,_error_prefix 31 | call display_string 32 | pop esi 33 | call display_string 34 | mov esi,_error_suffix 35 | call display_string 36 | ccall exit,0 37 | 38 | get_params: 39 | mov ecx,[argc] 40 | mov ebx,[argv] 41 | add ebx,4 42 | dec ecx 43 | jz bad_params 44 | get_param: 45 | mov esi,[ebx] 46 | mov al,[esi] 47 | cmp [input_file],0 48 | jne get_output_file 49 | mov [input_file],esi 50 | jmp next_param 51 | get_output_file: 52 | cmp [output_file],0 53 | jne bad_params 54 | mov [output_file],esi 55 | jmp next_param 56 | bad_params: 57 | stc 58 | ret 59 | next_param: 60 | add ebx,4 61 | dec ecx 62 | jnz get_param 63 | cmp [input_file],0 64 | je bad_params 65 | cmp [output_file],0 66 | je bad_params 67 | clc 68 | ret 69 | 70 | include 'system.inc' 71 | 72 | include '..\symbols.inc' 73 | 74 | section '.data' writeable align 4 75 | 76 | input_file dd 0 77 | output_file dd 0 78 | 79 | _usage db 'symbols dumper for flat assembler',0Dh,0Ah 80 | db 'usage: symbols ',0Dh,0Ah 81 | db 0 82 | _error_prefix db 'error: ',0 83 | _error_suffix db '.',0Dh,0Ah,0 84 | 85 | section '.bss' writeable align 4 86 | 87 | input dd ? 88 | output_buffer dd ? 89 | output_handle dd ? 90 | 91 | argc dd ? 92 | argv dd ? 93 | 94 | display_handle dd ? 95 | character db ? 96 | 97 | params rb 1000h 98 | buffer rb 1000h 99 | -------------------------------------------------------------------------------- /programs/fasm/tools/libc/system.inc: -------------------------------------------------------------------------------- 1 | 2 | extrn malloc 3 | extrn getenv 4 | extrn fopen 5 | extrn fclose 6 | extrn fread 7 | extrn fwrite 8 | extrn fseek 9 | extrn ftell 10 | extrn time 11 | extrn exit 12 | extrn 'free' as libc_free 13 | extrn 'write' as libc_write 14 | 15 | alloc: 16 | ccall malloc,eax 17 | test eax,eax 18 | jz allocation_failed 19 | clc 20 | ret 21 | allocation_failed: 22 | stc 23 | ret 24 | free: 25 | ccall libc_free,eax 26 | ret 27 | display_string: 28 | lodsb 29 | or al,al 30 | jz string_displayed 31 | mov dl,al 32 | call display_character 33 | jmp display_string 34 | string_displayed: 35 | ret 36 | display_character: 37 | mov [character],dl 38 | ccall libc_write,[display_handle],character,1 39 | ret 40 | open: 41 | push esi edi ebp 42 | call adapt_path 43 | ccall fopen,buffer,open_mode 44 | pop ebp edi esi 45 | or eax,eax 46 | jz file_error 47 | mov ebx,eax 48 | clc 49 | ret 50 | adapt_path: 51 | mov esi,edx 52 | mov edi,buffer 53 | copy_path: 54 | lods byte [esi] 55 | cmp al,'\' 56 | jne path_char_ok 57 | mov al,'/' 58 | path_char_ok: 59 | stos byte [edi] 60 | or al,al 61 | jnz copy_path 62 | cmp edi,buffer+1000h 63 | ja not_enough_memory 64 | ret 65 | create: 66 | push esi edi ebp 67 | call adapt_path 68 | ccall fopen,buffer,create_mode 69 | pop ebp edi esi 70 | or eax,eax 71 | jz file_error 72 | mov ebx,eax 73 | clc 74 | ret 75 | close: 76 | ccall fclose,ebx 77 | ret 78 | read: 79 | push ebx ecx edx esi edi 80 | ccall fread,edx,1,ecx,ebx 81 | pop edi esi edx ecx ebx 82 | cmp eax,ecx 83 | jne file_error 84 | clc 85 | ret 86 | file_error: 87 | stc 88 | ret 89 | write: 90 | push ebx ecx edx esi edi 91 | ccall fwrite,edx,1,ecx,ebx 92 | pop edi esi edx ecx ebx 93 | cmp eax,ecx 94 | jne file_error 95 | clc 96 | ret 97 | lseek: 98 | push ebx 99 | movzx eax,al 100 | ccall fseek,ebx,edx,eax 101 | mov ebx,[esp] 102 | ccall ftell,ebx 103 | pop ebx 104 | ret 105 | 106 | open_mode db 'r',0 107 | create_mode db 'w',0 108 | -------------------------------------------------------------------------------- /programs/fasm/tools/prepsrc.inc: -------------------------------------------------------------------------------- 1 | 2 | preprocessed_source: 3 | mov edx,[input_file] 4 | call open 5 | jc input_not_found 6 | mov al,2 7 | xor edx,edx 8 | call lseek 9 | cmp eax,30h 10 | jb invalid_input 11 | push eax 12 | call alloc 13 | jc not_enough_memory 14 | push eax 15 | xor al,al 16 | xor edx,edx 17 | call lseek 18 | mov ecx,[esp+4] 19 | mov edx,[esp] 20 | call read 21 | jc reading_error 22 | pop eax ecx 23 | cmp dword [eax],1A736166h 24 | jne invalid_input 25 | mov esi,[eax+32] 26 | add esi,eax 27 | mov ebp,[eax+36] 28 | add ebp,esi 29 | mov edi,eax 30 | push eax 31 | preprocessed_to_text: 32 | cmp esi,ebp 33 | jae conversion_done 34 | add esi,16 35 | xor dl,dl 36 | convert_preprocessed_line: 37 | lodsb 38 | cmp al,1Ah 39 | je copy_symbol 40 | cmp al,22h 41 | je copy_symbol 42 | cmp al,3Bh 43 | je preprocessor_symbols 44 | or al,al 45 | jz line_converted 46 | stosb 47 | xor dl,dl 48 | jmp convert_preprocessed_line 49 | copy_symbol: 50 | or dl,dl 51 | jz space_ok 52 | mov byte [edi],20h 53 | inc edi 54 | space_ok: 55 | cmp al,22h 56 | je quoted 57 | lodsb 58 | movzx ecx,al 59 | rep movsb 60 | or dl,-1 61 | jmp convert_preprocessed_line 62 | quoted: 63 | mov al,27h 64 | stosb 65 | lodsd 66 | mov ecx,eax 67 | jecxz quoted_copied 68 | copy_quoted: 69 | lodsb 70 | stosb 71 | cmp al,27h 72 | jne quote_ok 73 | stosb 74 | quote_ok: 75 | loop copy_quoted 76 | quoted_copied: 77 | mov al,27h 78 | stosb 79 | or dl,-1 80 | jmp convert_preprocessed_line 81 | preprocessor_symbols: 82 | mov al,3Bh 83 | stosb 84 | jmp copy_symbol 85 | line_converted: 86 | mov ax,0A0Dh 87 | stosw 88 | jmp preprocessed_to_text 89 | conversion_done: 90 | mov edx,[output_file] 91 | call create 92 | jc writing_error 93 | pop edx 94 | mov ecx,edi 95 | sub ecx,edx 96 | call write 97 | jc writing_error 98 | call close 99 | ret 100 | 101 | not_enough_memory: 102 | call error 103 | db 'not enough memory to load the required data',0 104 | input_not_found: 105 | call error 106 | db 'the input file was not found',0 107 | reading_error: 108 | call error 109 | db 'some error occured while trying to read file',0 110 | writing_error: 111 | call error 112 | db 'some error occured while trying to write file',0 113 | invalid_input: 114 | call error 115 | db 'input file is not a recognized assembly information format',0 116 | -------------------------------------------------------------------------------- /programs/fasm/tools/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | This directory contains some tools, which extract various types of information 3 | from the symbolic information file generated by flat assembler, and present 4 | them in a human-readable form. 5 | 6 | The listing tool creates a listing of assembled code - this tool needs to be 7 | executed in the exact configuration, in which the assembly was taking place. 8 | All the source files and the output file aswell must not have been moved or 9 | modified - if any of them was altered before generating the listing, it is 10 | going to contain garbage instead of useful information. For example, if you 11 | assembled the file with the command like: 12 | 13 | fasm example.asm example.exe -s example.fas 14 | 15 | you should generate listing by immediately running this command from the same 16 | directory: 17 | 18 | listing example.fas example.lst 19 | 20 | In addition, the "-a" switch is recommended to use in the case of executable 21 | formats, as it allows to get the run-time addresses for all the assembled code 22 | and data. 23 | 24 | The preprocessed source and symbols dump tools are simpler ones - they only 25 | need the symbolic information file as input and generate proper output text 26 | regardless of the availability of other files. 27 | -------------------------------------------------------------------------------- /programs/fasm/tools/win32/prepsrc.asm: -------------------------------------------------------------------------------- 1 | 2 | format PE console 4.0 3 | entry start 4 | 5 | include 'win32a.inc' 6 | 7 | section '.data' data readable writeable 8 | 9 | _usage db 'preprocessed source dumper for flat assembler',0Dh,0Ah 10 | db 'usage: prepsrc ',0Dh,0Ah 11 | db 0 12 | _error_prefix db 'error: ',0 13 | _error_suffix db '.',0Dh,0Ah,0 14 | 15 | input_file dd 0 16 | output_file dd 0 17 | 18 | display_handle dd ? 19 | bytes_count dd ? 20 | 21 | params rb 1000h 22 | 23 | section '.text' code readable executable 24 | 25 | start: 26 | 27 | mov [display_handle],STD_OUTPUT_HANDLE 28 | 29 | call get_params 30 | jnc make_dump 31 | 32 | mov esi,_usage 33 | call display_string 34 | invoke ExitProcess,2 35 | 36 | make_dump: 37 | call preprocessed_source 38 | invoke ExitProcess,0 39 | 40 | error: 41 | mov [display_handle],STD_ERROR_HANDLE 42 | mov esi,_error_prefix 43 | call display_string 44 | pop esi 45 | call display_string 46 | mov esi,_error_suffix 47 | call display_string 48 | invoke ExitProcess,1 49 | 50 | get_params: 51 | invoke GetCommandLine 52 | mov esi,eax 53 | mov edi,params 54 | find_command_start: 55 | lodsb 56 | cmp al,20h 57 | je find_command_start 58 | cmp al,22h 59 | je skip_quoted_name 60 | skip_name: 61 | lodsb 62 | cmp al,20h 63 | je find_param 64 | or al,al 65 | jz all_params 66 | jmp skip_name 67 | skip_quoted_name: 68 | lodsb 69 | cmp al,22h 70 | je find_param 71 | or al,al 72 | jz all_params 73 | jmp skip_quoted_name 74 | find_param: 75 | lodsb 76 | cmp al,20h 77 | je find_param 78 | cmp al,0Dh 79 | je all_params 80 | or al,al 81 | jz all_params 82 | cmp [input_file],0 83 | jne get_output_file 84 | mov [input_file],edi 85 | jmp process_param 86 | get_output_file: 87 | cmp [output_file],0 88 | jne bad_params 89 | mov [output_file],edi 90 | process_param: 91 | cmp al,22h 92 | je string_param 93 | copy_param: 94 | stosb 95 | lodsb 96 | cmp al,20h 97 | je param_end 98 | cmp al,0Dh 99 | je param_end 100 | or al,al 101 | jz param_end 102 | jmp copy_param 103 | string_param: 104 | lodsb 105 | cmp al,22h 106 | je string_param_end 107 | cmp al,0Dh 108 | je param_end 109 | or al,al 110 | jz param_end 111 | stosb 112 | jmp string_param 113 | bad_params: 114 | stc 115 | ret 116 | param_end: 117 | dec esi 118 | string_param_end: 119 | xor al,al 120 | stosb 121 | jmp find_param 122 | all_params: 123 | cmp [input_file],0 124 | je bad_params 125 | cmp [output_file],0 126 | je bad_params 127 | clc 128 | ret 129 | 130 | include 'system.inc' 131 | 132 | include '..\prepsrc.inc' 133 | 134 | section '.idata' import data readable writeable 135 | 136 | library kernel32,'KERNEL32.DLL' 137 | 138 | include 'api\kernel32.inc' 139 | -------------------------------------------------------------------------------- /programs/fasm/tools/win32/symbols.asm: -------------------------------------------------------------------------------- 1 | 2 | format PE console 4.0 3 | entry start 4 | 5 | include 'win32a.inc' 6 | 7 | section '.data' data readable writeable 8 | 9 | _usage db 'symbols dumper for flat assembler',0Dh,0Ah 10 | db 'usage: symbols ',0Dh,0Ah 11 | db 0 12 | _error_prefix db 'error: ',0 13 | _error_suffix db '.',0Dh,0Ah,0 14 | 15 | input_file dd 0 16 | output_file dd 0 17 | 18 | input dd ? 19 | output_buffer dd ? 20 | output_handle dd ? 21 | 22 | display_handle dd ? 23 | bytes_count dd ? 24 | 25 | params rb 1000h 26 | 27 | section '.text' code readable executable 28 | 29 | start: 30 | 31 | mov [display_handle],STD_OUTPUT_HANDLE 32 | 33 | call get_params 34 | jnc make_dump 35 | 36 | mov esi,_usage 37 | call display_string 38 | invoke ExitProcess,2 39 | 40 | make_dump: 41 | call symbols 42 | invoke ExitProcess,0 43 | 44 | error: 45 | mov [display_handle],STD_ERROR_HANDLE 46 | mov esi,_error_prefix 47 | call display_string 48 | pop esi 49 | call display_string 50 | mov esi,_error_suffix 51 | call display_string 52 | invoke ExitProcess,1 53 | 54 | get_params: 55 | invoke GetCommandLine 56 | mov esi,eax 57 | mov edi,params 58 | find_command_start: 59 | lodsb 60 | cmp al,20h 61 | je find_command_start 62 | cmp al,22h 63 | je skip_quoted_name 64 | skip_name: 65 | lodsb 66 | cmp al,20h 67 | je find_param 68 | or al,al 69 | jz all_params 70 | jmp skip_name 71 | skip_quoted_name: 72 | lodsb 73 | cmp al,22h 74 | je find_param 75 | or al,al 76 | jz all_params 77 | jmp skip_quoted_name 78 | find_param: 79 | lodsb 80 | cmp al,20h 81 | je find_param 82 | cmp al,0Dh 83 | je all_params 84 | or al,al 85 | jz all_params 86 | cmp [input_file],0 87 | jne get_output_file 88 | mov [input_file],edi 89 | jmp process_param 90 | get_output_file: 91 | cmp [output_file],0 92 | jne bad_params 93 | mov [output_file],edi 94 | process_param: 95 | cmp al,22h 96 | je string_param 97 | copy_param: 98 | stosb 99 | lodsb 100 | cmp al,20h 101 | je param_end 102 | cmp al,0Dh 103 | je param_end 104 | or al,al 105 | jz param_end 106 | jmp copy_param 107 | string_param: 108 | lodsb 109 | cmp al,22h 110 | je string_param_end 111 | cmp al,0Dh 112 | je param_end 113 | or al,al 114 | jz param_end 115 | stosb 116 | jmp string_param 117 | bad_params: 118 | stc 119 | ret 120 | param_end: 121 | dec esi 122 | string_param_end: 123 | xor al,al 124 | stosb 125 | jmp find_param 126 | all_params: 127 | cmp [input_file],0 128 | je bad_params 129 | cmp [output_file],0 130 | je bad_params 131 | clc 132 | ret 133 | 134 | include 'system.inc' 135 | 136 | include '..\symbols.inc' 137 | 138 | section '.idata' import data readable writeable 139 | 140 | library kernel32,'KERNEL32.DLL' 141 | 142 | include 'api\kernel32.inc' 143 | -------------------------------------------------------------------------------- /programs/fasm/tools/win32/system.inc: -------------------------------------------------------------------------------- 1 | 2 | display_string: 3 | invoke GetStdHandle,[display_handle] 4 | mov edx,eax 5 | mov edi,esi 6 | or ecx,-1 7 | xor al,al 8 | repne scasb 9 | neg ecx 10 | sub ecx,2 11 | invoke WriteFile,edx,esi,ecx,bytes_count,0 12 | retn 13 | alloc: 14 | invoke VirtualAlloc,0,eax,MEM_COMMIT,PAGE_READWRITE 15 | or eax,eax 16 | jz allocation_error 17 | clc 18 | retn 19 | allocation_error: 20 | stc 21 | retn 22 | free: 23 | invoke VirtualFree,eax,0,MEM_RELEASE 24 | retn 25 | open: 26 | invoke CreateFile,edx,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,0,0 27 | cmp eax,-1 28 | je file_error 29 | mov ebx,eax 30 | clc 31 | retn 32 | file_error: 33 | stc 34 | retn 35 | create: 36 | invoke CreateFile,edx,GENERIC_WRITE,0,0,CREATE_ALWAYS,0,0 37 | cmp eax,-1 38 | je file_error 39 | mov ebx,eax 40 | clc 41 | retn 42 | write: 43 | invoke WriteFile,ebx,edx,ecx,bytes_count,0 44 | or eax,eax 45 | jz file_error 46 | clc 47 | retn 48 | read: 49 | push ecx 50 | invoke ReadFile,ebx,edx,ecx,bytes_count,0 51 | pop edx 52 | or eax,eax 53 | jz file_error 54 | cmp edx,[bytes_count] 55 | jne file_error 56 | clc 57 | retn 58 | close: 59 | invoke CloseHandle,ebx 60 | retn 61 | lseek: 62 | movzx eax,al 63 | invoke SetFilePointer,ebx,edx,0,eax 64 | cmp eax,-1 65 | je file_error 66 | retn 67 | -------------------------------------------------------------------------------- /programs/irc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/irc.bin -------------------------------------------------------------------------------- /programs/irc/build.sh: -------------------------------------------------------------------------------- 1 | gcc -I ../../include -c irc.c -m32 -o irc.o -m32 -std=gnu99 -ffreestanding -Wall -Wextra -Wno-unused-parameter || exit 2 | gcc -T ./../../lib/linker.ld -o ./irc -m32 -ffreestanding -O2 -nostdlib irc.o ./../../lib/user32.o ./../../lib/modern.o ./../../lib/stub.o || exit 3 | cp ./irc ../irc.bin -------------------------------------------------------------------------------- /programs/irc/irc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/irc/irc -------------------------------------------------------------------------------- /programs/irc/irc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #define DEFAULT_IRC_PORT 6667 8 | #define DEFAULT_IRC_ADDR "chat.freenode.net" 9 | #define MESSAGEBUFFER 50 10 | 11 | unsigned char *addressip; 12 | unsigned char* getIPFromName(char* t); 13 | 14 | void recievemessage(unsigned long addr,unsigned long count){ 15 | write(1, (const char *)addr, count); 16 | unsigned char t[2]; 17 | t[0] = '\n'; 18 | t[1] = 0x00; 19 | write(1, (const char *)&t, 1); 20 | unsigned char* buffer = (unsigned char*) addr; 21 | if(buffer[0]=='P'&&buffer[1]=='I'&&buffer[2]=='N'&&buffer[3]=='G'&&buffer[4]==' '){ 22 | buffer[1] = 'O'; 23 | unsigned char *t4 = (unsigned char*)0x1000; 24 | sendnetworkpackage(2,count,t4,(int)buffer,DEFAULT_IRC_PORT); 25 | } 26 | } 27 | 28 | char* getline(){ 29 | char* message = malloc(MESSAGEBUFFER); 30 | int i = 0; 31 | for(i = 0 ; i < MESSAGEBUFFER ; i++){ 32 | unsigned char y = getc((FILE*)1) & 0x000000FF; 33 | message[i] = y; 34 | write(1, (void *)&message[i], 1); 35 | if(y=='\n'){ 36 | message[i+1] = 0; 37 | break; 38 | } 39 | } 40 | message[i+1] = 0; 41 | return message; 42 | } 43 | 44 | int main(int argc, char** argv){ 45 | printf("welcome to our irc client\n"); 46 | addressip = getIPFromName(DEFAULT_IRC_ADDR); 47 | 48 | unsigned char *t4 = (unsigned char*)0x1000; 49 | t4[0] = addressip[0]; 50 | t4[1] = addressip[1]; 51 | t4[2] = addressip[2]; 52 | t4[3] = addressip[3]; 53 | int tx = 0x00200000; 54 | initialisenetworkpackage(2,1,addressip,tx,DEFAULT_IRC_PORT); 55 | while(1){ 56 | char *z = getline(); 57 | size_t sizeline = strlen(z); 58 | for(size_t i = 0 ; i < sizeline ; i++){ 59 | char y = z[i]; 60 | if(y==' '||y==0x0a){ 61 | break; 62 | } 63 | y += ('A'-'a'); 64 | z[i] = y; 65 | } 66 | for(size_t i = 0 ; i < sizeline ; i++){ 67 | if(z[i]==';'){ 68 | z[i] = ':'; 69 | } 70 | if(z[i]=='\\'){ 71 | z[i] = '#'; 72 | } 73 | } 74 | sendnetworkpackage(2,sizeline,t4,(int)z,DEFAULT_IRC_PORT); 75 | free(z); 76 | unsigned char t[2]; 77 | t[0] = '\n'; 78 | t[1] = 0x00; 79 | write(1, (const char *)&t, 1); 80 | } 81 | return EXIT_SUCCESS; 82 | } 83 | 84 | unsigned char* getIPFromName(char* t){ 85 | unsigned long func = F_GETIPFROMNAME; 86 | unsigned char* (*sendPackage)(char* t) = (void*)func; 87 | return sendPackage(t); 88 | } -------------------------------------------------------------------------------- /programs/irc/irc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/irc/irc.o -------------------------------------------------------------------------------- /programs/proglinker.ld: -------------------------------------------------------------------------------- 1 | ENTRY(_start) 2 | 3 | SECTIONS 4 | { 5 | . = 0x5000; 6 | .text : { *(.text) } 7 | .data : { *(.data) } 8 | .bss : { *(.bss) } 9 | } 10 | -------------------------------------------------------------------------------- /programs/sedit.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/sedit.bin -------------------------------------------------------------------------------- /programs/sedit/build.sh: -------------------------------------------------------------------------------- 1 | fasm startup.asm startup.o || exit 2 | gcc -I ../../include -c sedit.c -m32 -o sedit.o -m32 -std=gnu99 -ffreestanding -Wall -Wextra -Wno-unused-parameter || exit 3 | gcc -T linker.ld -o ./sedit -m32 -ffreestanding -O2 -nostdlib startup.o sedit.o || exit 4 | 5 | cp ./sedit ../sedit.bin -------------------------------------------------------------------------------- /programs/sedit/linker.ld: -------------------------------------------------------------------------------- 1 | /* The bootloader will look at this image and start execution at the symbol 2 | designated as the entry point. */ 3 | ENTRY(_start) 4 | 5 | /* Tell where the various sections of the object files will be put in the final 6 | kernel image. */ 7 | SECTIONS 8 | { 9 | /* Begin putting sections at 1 MiB, a conventional place for kernels to be 10 | loaded at by the bootloader. */ 11 | . = 5M; 12 | 13 | /* First put the multiboot header, as it is required to be put very early 14 | early in the image or the bootloader won't recognize the file format. 15 | Next we'll put the .text section. */ 16 | .text BLOCK(4K) : ALIGN(4K) 17 | { 18 | *(.text) 19 | } 20 | 21 | /* Read-only data. */ 22 | .rodata BLOCK(4K) : ALIGN(4K) 23 | { 24 | *(.rodata) 25 | } 26 | 27 | /* Read-write data (initialized) */ 28 | .data BLOCK(4K) : ALIGN(4K) 29 | { 30 | *(.data) 31 | } 32 | 33 | /* Read-write data (uninitialized) and stack */ 34 | .bss BLOCK(4K) : ALIGN(4K) 35 | { 36 | *(COMMON) 37 | *(.bss) 38 | } 39 | 40 | /* The compiler may produce other sections, by default it will put them in 41 | a segment with the same name. Simply add stuff here as needed. */ 42 | } 43 | -------------------------------------------------------------------------------- /programs/sedit/sedit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/sedit/sedit -------------------------------------------------------------------------------- /programs/sedit/sedit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/sedit/sedit.o -------------------------------------------------------------------------------- /programs/sedit/startup.asm: -------------------------------------------------------------------------------- 1 | 2 | format ELF 3 | public _start 4 | extrn main 5 | 6 | section '.text' executable 7 | 8 | _start: 9 | call main 10 | ret 11 | -------------------------------------------------------------------------------- /programs/sedit/startup.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/sedit/startup.o -------------------------------------------------------------------------------- /programs/voorbeeld.asm: -------------------------------------------------------------------------------- 1 | [bits 32] 2 | [org 0x2000] 3 | main: 4 | 5 | ; call system to print hello world 6 | mov eax,4 7 | mov ebx,1 8 | mov ecx,message 9 | mov edx,11 10 | int 0x80 11 | 12 | 13 | 14 | ; call system to stop 15 | mov eax,1 16 | mov ebx,0 17 | mov ecx,0 18 | mov edx,0 19 | int 0x80 20 | 21 | cli 22 | hlt 23 | 24 | message db "Hello world",0x00 -------------------------------------------------------------------------------- /programs/voorbeeld.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/programs/voorbeeld.bin -------------------------------------------------------------------------------- /utils/gensymbols: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdeRegt/SanderOSUSB/f4dcef172e1f5a4e9bbf0d86c0a9c4536113a32b/utils/gensymbols -------------------------------------------------------------------------------- /utils/gensymbols.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define addresssize 8 6 | 7 | int main(int argc,char** argv){ 8 | remove("../include/symbols.h"); 9 | FILE *bestand = fopen("../symbols","r"); 10 | FILE *writer = fopen("../include/symbols.h","w"); 11 | if(bestand){ 12 | fseek(bestand, 0, SEEK_END); 13 | size_t filelen = ftell(bestand); 14 | size_t lengte = 0; 15 | rewind(bestand); 16 | while(1){ 17 | unsigned char buffer[addresssize]; 18 | unsigned char isok = 0; 19 | size_t read = fread(buffer,addresssize,1,bestand); 20 | lengte += 5; 21 | 22 | for(int i = 0 ; i < 7 ; i++){ 23 | lengte++; 24 | unsigned char buffer3[1]; 25 | fread(buffer3,1,1,bestand); 26 | } 27 | 28 | lengte++; 29 | unsigned char buffer4[1]; 30 | fread(buffer4,1,1,bestand); 31 | 32 | if(buffer4[0]=='F'){ 33 | isok = 1; 34 | } 35 | 36 | lengte++; 37 | unsigned char buffer5[1]; 38 | fread(buffer5,1,1,bestand); 39 | 40 | nogmaals: 41 | lengte++; 42 | unsigned char buffer6[1]; 43 | fread(buffer6,1,1,bestand); 44 | if(buffer6[0]!='\t'&&buffer6[0]!='\n'){ 45 | goto nogmaals; 46 | } 47 | 48 | if(buffer6[0]!='\n'){ 49 | if(isok){ 50 | fprintf(writer,"#define F_"); 51 | } 52 | 53 | unsigned char buffer9[addresssize+1]; 54 | fread(buffer9,addresssize+1,1,bestand); 55 | 56 | unsigned char tor = 0; 57 | nogmaals2: 58 | lengte++; 59 | unsigned char buffer10[1]; 60 | fread(buffer10,1,1,bestand); 61 | if(buffer10[0]!='\n'){ 62 | if(isok&&buffer10[0]!='.'&&buffer10[0]!=' '){ 63 | tor++; 64 | fprintf(writer,"%c",toupper(buffer10[0])); 65 | } 66 | goto nogmaals2; 67 | } 68 | 69 | if(isok){ 70 | if(tor<10){ 71 | fprintf(writer,"\t"); 72 | } 73 | if(tor<20){ 74 | fprintf(writer,"\t"); 75 | } 76 | fprintf(writer,"\t0x%c%c%c%c%c%c%c%c\n",buffer[0],buffer[1],buffer[2],buffer[3],buffer[4],buffer[5],buffer[6],buffer[7]); 77 | } 78 | } 79 | 80 | if(lengte>filelen){ 81 | break; 82 | } 83 | } 84 | fclose(bestand); 85 | fclose(writer); 86 | }else{ 87 | printf("ERROR: unable to open file\n"); 88 | } 89 | exit(0); 90 | } --------------------------------------------------------------------------------