Browse Source

add booter

master
abbycin 1 year ago
commit
75e6ab599f
4 changed files with 1505 additions and 0 deletions
  1. 186
    0
      .gitignore
  2. 11
    0
      booter/Makefile
  3. 1263
    0
      booter/bochsrc
  4. 45
    0
      booter/boot.asm

+ 186
- 0
.gitignore View File

@@ -0,0 +1,186 @@
#CLion
.idea
#
bin
*.swp
# ---> C
# Object files
*.o
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/

# ---> C++
# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# ---> Node
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules

# ---> Qt
# C++ objects and libs

*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib

# Qt-es

/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile.*
*-build-*

# QtCreator

*.autosave

#QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*

# ---> Ruby
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

## Specific to RubyMotion:
.dat*
.repl_history
build/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalisation:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# ---> Rust
# Compiled files
*.o
*.so
*.rlib
*.dll

# Executables
*.exe

# Generated by Cargo
/target/


+ 11
- 0
booter/Makefile View File

@@ -0,0 +1,11 @@
all: boot.bin
dd if=boot.bin of=boot.img bs=512 count=1 conv=notrunc

boot.bin: boot.asm
nasm $^ -o $@

run:
bochs -f bochsrc

clean:
rm -f *.img *.bin *.txt

+ 1263
- 0
booter/bochsrc
File diff suppressed because it is too large
View File


+ 45
- 0
booter/boot.asm View File

@@ -0,0 +1,45 @@
org 0x7c00
base equ 0x7c00
msg db "too young too simple"

;mov ax, cs
;mov ds, ax
;mov es, ax
;mov ss, ax
mov sp, base

clear:
mov ax, 0x0600
mov bx, 0x0700
mov cx, 0
mov dx, 0xffff
int 0x10
jmp focus

focus:
mov ax, 0x0200
mov bx, 0
mov dx, 0x0505
int 0x10
jmp elder

elder:
mov ax, 0x1301
mov bx, 0x000f
mov dx, 0x1010
mov bx, 0x0002
mov cx, 20
;push ax
;mov ax, ds
;mov es, ax
;pop ax
mov bp, msg
int 0x10
jmp start

start:
jmp clear

call start
times 510 - ($ - $$) db 0
dw 0xaa55

Loading…
Cancel
Save