Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
John P. Willis
ilxi
Commits
88daccb0
Commit
88daccb0
authored
May 22, 2016
by
John P. Willis
Browse files
Catch up
parent
8e20195f
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
158 additions
and
39 deletions
+158
-39
Makefile
Makefile
+19
-9
src/include/libobj.bi
src/include/libobj.bi
+34
-0
src/include/message.bi
src/include/message.bi
+11
-2
src/include/storage.bi
src/include/storage.bi
+2
-4
src/lib/message.bas
src/lib/message.bas
+0
-24
src/libilxi/Makefile
src/libilxi/Makefile
+0
-0
src/libilxi/asm.bas
src/libilxi/asm.bas
+0
-0
src/libilxi/bus.bas
src/libilxi/bus.bas
+0
-0
src/libilxi/config.bas
src/libilxi/config.bas
+0
-0
src/libilxi/console.bas
src/libilxi/console.bas
+0
-0
src/libilxi/cpu.bas
src/libilxi/cpu.bas
+0
-0
src/libilxi/disk.bas
src/libilxi/disk.bas
+0
-0
src/libilxi/error.bas
src/libilxi/error.bas
+0
-0
src/libilxi/help.bas
src/libilxi/help.bas
+0
-0
src/libilxi/host.bas
src/libilxi/host.bas
+0
-0
src/libilxi/inst.bas
src/libilxi/inst.bas
+0
-0
src/libilxi/lexer.bas
src/libilxi/lexer.bas
+0
-0
src/libilxi/message.bas
src/libilxi/message.bas
+92
-0
src/libilxi/profile.bas
src/libilxi/profile.bas
+0
-0
src/libilxi/signal.bas
src/libilxi/signal.bas
+0
-0
No files found.
Makefile
View file @
88daccb0
...
...
@@ -25,31 +25,41 @@
#
BINFILES
=
xiasm mkdisk ilxi ilxi.xmf
all
:
vm xiasm util
all
:
vm xiasm util
linker
dist
:
all
mkdir
-p
dist/
cp
src/linker/link dist/
cp
src/vm/ilxi dist/
cp
src/util/mkdisk dist/
cp
src/xiasm/xiasm dist/
cp
doc/ilxi.xmf dist/
cp
bin/.ilximrc dist/
cp
examples/input/input.xa dist/
lib
:
cd
src/lib
;
make
vm
:
lib
libilxi
:
cd
src/libilxi
;
make
libobj
:
libilxi
cd
src/libobj
;
make
linker
:
libilxi libobj
cd
src/linker
;
make
vm
:
libilxi
cd
src/vm
;
make
xiasm
:
lib
xiasm
:
lib
ilxi libobj
cd
src/xiasm
;
make
util
:
lib
util
:
lib
ilxi
cd
src/util
;
make
clean
:
cd
src/lib
;
make clean
cd
src/libilxi
;
make clean
cd
src/libobj
;
make clean
cd
src/vm
;
make clean
cd
src/util
;
make clean
cd
src/xiasm
;
make clean
cd
src/linker
;
make clean
rm
-rf
dist
src/include/libobj.bi
0 → 100644
View file @
88daccb0
'
' OBJECT FILE FORMAT
'
' object_header
' magic: must be XIO
' relocation_count: number of relocation_entry records
'
' relocation_entry: 1 per relocation entry
'
' section_header:
'
' st_page: binary image
type object_header
magic as string * 3 ' XIO
symbol_count as integer
relocation_count as integer
section_count as integer
end type
' these are references to symbols
type relocation_entry
key as string * 24
reference_offset as ushort
section_title as string * 16
section_offset as ushort
end type
type section_header
title as string * 16
origin as ushort
size as ushort
end type
src/include/message.bi
View file @
88daccb0
'
' message.bi
'
#define MSG_INFO 0
#define MSG_WARN 1
#define MSG_WARNING 1
#define MSG_ERROR 2
#define MSG_LISTING 3
declare sub message_init()
declare sub message_print(output_string as string)
declare sub tool_message(msg_level as ubyte, tool as string, message as string, byval output_location as string = "")
declare sub list_heading(tool as string, byval input_file as string)
declare sub listing(line_number as integer, address as string, code_output as string, byval listfile as string)
declare sub list_output(msg as string, byval listfile as string)
dim shared message_row as integer
dim shared message_col as integer
\ No newline at end of file
dim shared message_col as integer
src/include/storage.bi
View file @
88daccb0
...
...
@@ -2,8 +2,6 @@
#define PAGECOUNT 2048
type st_page
task_id as ubyte
label as string * 255
contents(0 to PAGESIZE - 1) as ubyte
end type
...
...
@@ -13,7 +11,7 @@ declare sub st_load_page(file as string, page as integer)
declare sub st_save_page(file as string, page as integer)
declare sub st_write_word(page as integer, offset as integer, wordval as ushort)
declare function st_read_word(page as integer, offset as integer) as ushort
declare function st_read_page(page as integer) as st_page
\ No newline at end of file
src/lib/message.bas
deleted
100644 → 0
View file @
8e20195f
'
' message.bas
'
#include "message.bi"
#include "console.bi"
#include "cpu.bi"
#include "asm.bi"
sub message_init()
console_mutex = mutexcreate()
end sub ' message_init()
sub message_print(output_string as string)
mutexlock console_mutex
print output_string
mutexunlock console_mutex
end sub ' message_print()
\ No newline at end of file
src/lib/Makefile
→
src/lib
ilxi
/Makefile
View file @
88daccb0
File moved
src/lib/asm.bas
→
src/lib
ilxi
/asm.bas
View file @
88daccb0
File moved
src/lib/bus.bas
→
src/lib
ilxi
/bus.bas
View file @
88daccb0
File moved
src/lib/config.bas
→
src/lib
ilxi
/config.bas
View file @
88daccb0
File moved
src/lib/console.bas
→
src/lib
ilxi
/console.bas
View file @
88daccb0
File moved
src/lib/cpu.bas
→
src/lib
ilxi
/cpu.bas
View file @
88daccb0
File moved
src/lib/disk.bas
→
src/lib
ilxi
/disk.bas
View file @
88daccb0
File moved
src/lib/error.bas
→
src/lib
ilxi
/error.bas
View file @
88daccb0
File moved
src/lib/help.bas
→
src/lib
ilxi
/help.bas
View file @
88daccb0
File moved
src/lib/host.bas
→
src/lib
ilxi
/host.bas
View file @
88daccb0
File moved
src/lib/inst.bas
→
src/lib
ilxi
/inst.bas
View file @
88daccb0
File moved
src/lib/lexer.bas
→
src/lib
ilxi
/lexer.bas
View file @
88daccb0
File moved
src/libilxi/message.bas
0 → 100644
View file @
88daccb0
'
' message.bas
'
#include "message.bi"
#include "console.bi"
#include "cpu.bi"
#include "asm.bi"
sub message_init()
console_mutex = mutexcreate()
end sub ' message_init()
sub message_print(output_string as string)
mutexlock console_mutex
print output_string
mutexunlock console_mutex
end sub ' message_print()
sub tool_message(msg_level as ubyte, tool as string, message as string, byval output_location as string = "")
dim msg_prefix as string
msg_prefix = ucase(tool) + ": "
select case msg_level
case MSG_INFO
msg_prefix += "INFO " + message
case MSG_WARN
msg_prefix += "WARNING " + message
case MSG_ERROR
msg_prefix += "ERROR " + message
end select
if len(output_location) > 0 then
dim fnum as integer = freefile()
open output_location for append as #fnum
print #fnum, msg_prefix
close #fnum
else
print msg_prefix
end if
end sub
sub list_heading(tool as string, byval input_file as string)
dim fnum as integer = freefile()
dim listfile as string
listfile = ucase(left(input_file, instrrev(input_file, ".") - 1)) & ".LIS"
open listfile for append as #fnum
print #fnum,""
print #fnum,
print #fnum, "", tool; " LISTING FOR "; ucase(input_file), date()
print #fnum,""
print #fnum," LINE", "OFFSET" , "CODE"
print #fnum, string(72, "-")
close #fnum
end sub
sub listing(line_number as integer, address as string, code_output as string, byval listfile as string)
dim fnum as integer = freefile()
listfile = ucase(left(listfile, instrrev(listfile, ".") - 1)) & ".LIS"
open listfile for append as #fnum
print #fnum, line_number, address, code_output
close #fnum
end sub
sub list_output(msg as string, byval listfile as string)
dim fnum as integer = freefile()
listfile = ucase(left(listfile, instrrev(listfile, ".") - 1)) & ".LIS"
open listfile for append as #fnum
print #fnum, msg
close #fnum
end sub
src/lib/profile.bas
→
src/lib
ilxi
/profile.bas
View file @
88daccb0
File moved
src/lib/signal.bas
→
src/lib
ilxi
/signal.bas
View file @
88daccb0
File moved
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment