Configured the project to begin working on part one.

This commit is contained in:
2023-03-02 20:16:05 -05:00
parent 5d3b099970
commit a12ba641f1
14 changed files with 18742 additions and 1 deletions

7
part_1/build.bat Normal file
View File

@ -0,0 +1,7 @@
@echo off
if not exist build\nul (
meson setup build
)
ninja -C build

13
part_1/clean.bat Normal file
View File

@ -0,0 +1,13 @@
@echo off
if exist build\nul (
@RD /S /Q "build"
)
if exist tests\listing_0037_single_register_mov (
DEL /Q tests\listing_0037_single_register_mov
)
if exist tests\listing_0038_many_register_mov (
DEL /Q tests\listing_0038_many_register_mov
)

5
part_1/meson.build Normal file
View File

@ -0,0 +1,5 @@
project( 'sim_8086', 'c', 'cpp' )
include_thirdparty = include_directories( '../thirdparty' )
executable( 'sim_8086', 'sim_8086.c', include_directories : include_thirdparty )

12
part_1/sim_8086.c Normal file
View File

@ -0,0 +1,12 @@
#define ZPL_IMPLEMENTATION
#include "zpl.h"
int main()
{
zpl_printf("sim 8086!");
return 0;
}

8
part_1/test.bat Normal file
View File

@ -0,0 +1,8 @@
@echo off
echo Assembling: listing_0037_single_register_mov.asm
call nasm ".\tests\listing_0037_single_register_mov.asm"
echo Assembling: listing_0038_many_register_mov.asm
call nasm ".\tests\listing_0038_many_register_mov.asm"

View File

@ -0,0 +1,19 @@
; ========================================================================
;
; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved.
;
; This software is provided 'as-is', without any express or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Please see https://computerenhance.com for further information
;
; ======================================================================== */
; ========================================================================
; LISTING 37
; ========================================================================
bits 16
mov cx, bx

View File

@ -0,0 +1,29 @@
; ========================================================================
;
; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved.
;
; This software is provided 'as-is', without any express or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Please see https://computerenhance.com for further information
;
; ======================================================================== */
; ========================================================================
; LISTING 38
; ========================================================================
bits 16
mov cx, bx
mov ch, ah
mov dx, bx
mov si, bx
mov bx, di
mov al, cl
mov ch, ch
mov bx, ax
mov bx, si
mov sp, di
mov bp, ax