mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
starting assembly
This commit is contained in:
parent
826ad2245e
commit
0d2f94314a
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
k.exe
|
*.exe
|
||||||
|
*.out
|
||||||
*.o
|
*.o
|
||||||
|
test*
|
||||||
arch_i.h
|
arch_i.h
|
||||||
|
|
||||||
|
22
Makefile
22
Makefile
@ -1,23 +1,13 @@
|
|||||||
# The OS/K Team licenses this file to you under the MIT license.
|
# The OS/K Team licenses this file to you under the MIT license.
|
||||||
# See the LICENSE file in the project root for more information.
|
# See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
all: k.exe
|
all: pc as
|
||||||
|
|
||||||
src = instr/instrs.c karch/decd.c karch/main.c karch/regs.c \
|
pc:
|
||||||
karch/dump.c instr/jumps.c
|
cd pc && make
|
||||||
|
|
||||||
obj = $(patsubst %.c,%.o,$(src))
|
as:
|
||||||
|
cd as && make
|
||||||
|
|
||||||
%.o: %.c instrs/i_arch.h */*.h $(src)
|
test: all
|
||||||
@gcc -O2 -Wall -I./karch -c $< -o $@
|
|
||||||
|
|
||||||
instrs/i_arch.h: instr/INSTRS instr/instrs.py
|
|
||||||
@python3 instr/instrs.py
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@rm */*.o
|
|
||||||
|
|
||||||
k.exe: $(obj) instrs/i_arch.h instr/INSTRS instr/instrs.py
|
|
||||||
@gcc -O2 -Wall $(obj) -o k.exe
|
|
||||||
@rm */*.o
|
|
||||||
|
|
||||||
|
0
as/Makefile
Normal file
0
as/Makefile
Normal file
4
as/k-as.py
Normal file
4
as/k-as.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
|
||||||
|
|
25
pc/Makefile
Normal file
25
pc/Makefile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# The OS/K Team licenses this file to you under the MIT license.
|
||||||
|
# See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
|
all: k.exe
|
||||||
|
|
||||||
|
src = instrs.c decd.c main.c regs.c \
|
||||||
|
dump.c jumps.c
|
||||||
|
|
||||||
|
obj = $(patsubst %.c,%.o,$(src))
|
||||||
|
|
||||||
|
%.o: %.c instrs/i_arch.h */*.h $(src)
|
||||||
|
@gcc -O2 -Wall -I./karch -c $< -o $@
|
||||||
|
|
||||||
|
instrs/i_arch.h: INSTRS instrs.py
|
||||||
|
@python3 instrs.py
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm *.o
|
||||||
|
|
||||||
|
k.exe: $(obj) i_arch.h INSTRS instrs.py
|
||||||
|
@gcc -O2 -Wall $(obj) -o ../k.exe
|
||||||
|
@rm *.o
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# The OS/K Team licences this file to you under the MIT license.
|
# The OS/K Team licences this file to you under the MIT license.
|
||||||
# See the LICENSE file in the project root for more information.
|
# See the LICENSE file in the project root for more information.
|
Loading…
x
Reference in New Issue
Block a user