An open API service indexing awesome lists of open source software.

https://github.com/SartoxSoftware/Batch2OS

A Batch to native 16-bit x86 compiler, made in Rust.
https://github.com/SartoxSoftware/Batch2OS

batch kernel native osdev rust x86

Last synced: 7 months ago
JSON representation

A Batch to native 16-bit x86 compiler, made in Rust.

Awesome Lists containing this project

README

        

[![SAY NO TO THE TRADEMARK POLICY ](https://gist.githubusercontent.com/blyxyas/8f17fbe1cafdeff65bbe6b332d4f4723/raw/715a24df3ad74b838c6b0ff8079d3f7f9172b0db/banner.svg)](https://github.com/blyxyas/no-rust-policy-change)

# Batch2OS
A Batch to native 16-bit x86 compiler, made in Rust.

![img.png](img.png)

# Usage
``Batch2OS ``

## Example
``Batch2OS os.bat kernel.bin 0x7C00 0x1000``

# Try it out!
After you've compiled your batch script as a bootable image file, you may want to try it on bare metal now. If that isn't possible, you can try it out in a VM. Here's an example with QEMU:

``qemu-system-i386 kernel.bin``

# Compatibility
Batch2OS emits x86 code that is theoretically compatible starting from the Intel 8086. That is because Batch2OS currently uses real mode BIOS interrupts, which are 16-bit and were introduced back in the 8086.

# Supported commands
- ``help``
- ``cls``
- ``echo``
- ``pause``
- ``ver``
- ``color``
- ``goto``

# Limitations
- Uses BIOS interrupts to do pretty much everything
- It's limited to loading up to 255 sectors because of the byte limit

# TODO
- Go into protected mode (and figure out how to replace the BIOS interrupts with equivalent code??)