bootstrap: Include necessary M1 sources.

M1 -f stage0/x86.M1 -f mlibc/crt1.M1 --LittleEndian --Architecture=1 > mlibc/crt1.hex2
   M1 -f stage0/x86.M1 -f mlibc/mini-libc-mes.M1 --LittleEndian --Architecture=1  > mlibc/libc-mes.hex2
   M1 -f stage0/x86.M1 -f src/mes.M1 --LittleEndian --Architecture=1 > src/mes.hex2
   hex2 --LittleEndian --Architecture=1 --BaseAddress=0x1000000 -f stage0/elf32-header.hex2 -f mlibc/crt1.hex2 -f mlibc/libc-mes.hex2 -f src/mes.hex2 -f stage0/elf32-footer-single-main.hex2 > src/mes-mes
   exec_enable src/mes-mes

* mlibc/crt1.M1: New File.
* mlibc/libc-mes.M1: New File.
* src/mes.M1: New File.
This commit is contained in:
Jan Nieuwenhuizen 2017-09-10 21:17:17 +02:00
parent 81ddc698bb
commit 6c55f4bd28
3 changed files with 28433 additions and 0 deletions

33
mlibc/crt1.M1 Normal file
View File

@ -0,0 +1,33 @@
:_start
push___%ebp
mov____%esp,%ebp
sub____%esp,$i32 %0x1054
mov____%ebp,%eax
add____$i8,%eax !4
movzbl_(%eax),%eax
add____$i8,%eax !3
shl____$i8,%eax !0x02
add____%ebp,%eax
mov____%eax,0x32 &g_environment
mov____%ebp,%eax
add____$i8,%eax !8
push___%eax
mov____%ebp,%eax
add____$i8,%eax !4
movzbl_(%eax),%eax
push___%eax
# main();
call32 %main
add____$i8,%esp !0x0
test___%eax,%eax
mov____%eax,%ebx
mov____$i32,%eax %1
int____$0x80
hlt
leave
ret
:g_environment
!0x00 !0x00 !0x00 !0x00

1917
mlibc/libc-mes.M1 Normal file

File diff suppressed because it is too large Load Diff

26483
src/mes.M1 Normal file

File diff suppressed because one or more lines are too long