FUZIX.git
6 years agoinit: crunched table not reseting runlevel mask, correct cleanup.
Brett Gordon [Fri, 10 Nov 2017 05:57:32 +0000 (00:57 -0500)]
init: crunched table not reseting runlevel mask, correct cleanup.

6 years agotelnet: remove un-needed define copies
Alan Cox [Thu, 9 Nov 2017 23:10:26 +0000 (23:10 +0000)]
telnet: remove un-needed define copies

6 years agonetd: make tracing easier to control, do tcp polls after events for speed
Alan Cox [Thu, 9 Nov 2017 23:09:40 +0000 (23:09 +0000)]
netd: make tracing easier to control, do tcp polls after events for speed

6 years agogethostbyname: this crashes with a null pointer trap
Alan Cox [Thu, 9 Nov 2017 23:09:05 +0000 (23:09 +0000)]
gethostbyname: this crashes with a null pointer trap

Fix up what I think was intended

6 years agonetd: minor changes to fuzix-conf
Alan Cox [Thu, 9 Nov 2017 23:08:15 +0000 (23:08 +0000)]
netd: minor changes to fuzix-conf

6 years agonetd: use the right clock
Alan Cox [Thu, 9 Nov 2017 23:06:54 +0000 (23:06 +0000)]
netd: use the right clock

timer 1 is CPU time. That works by luck on a 6809 but on a Z80 clone at
lots of MHz it doesn't run very fast!

What we really need to do is expose the kernel 1/10th second raw tick clock
as timer 2

6 years agoping: endianisms
Alan Cox [Thu, 9 Nov 2017 22:19:07 +0000 (22:19 +0000)]
ping: endianisms

6 years agoslip: fix dumb bug that corrupted memory
Alan Cox [Thu, 9 Nov 2017 22:17:09 +0000 (22:17 +0000)]
slip: fix dumb bug that corrupted memory

6 years agonetd: Futher fixes
Alan Cox [Thu, 9 Nov 2017 01:20:57 +0000 (01:20 +0000)]
netd: Futher fixes

With these applied you can ping and remotely interact with the stack but
local interactions are not yet working (probably byte order) and also the
close() functionality is a bit messed up.

We need to

a) break the mapping when the kernel asks us to move to closed
b) do the flag test *outside* of the app callbacks (as we may be closing
   without any app callbacks happening)
c) allow for events from uip on unmapped sockets (one the kernel closed),
   in which case we should reset if there is data arriving, and otherwise
   cycle through the close states and close in uip, then free up the broken
   mapping slot

6 years agonet_native: fix build with SDCC
Alan Cox [Thu, 9 Nov 2017 01:20:12 +0000 (01:20 +0000)]
net_native: fix build with SDCC

6 years agomicropack: update MMU definitions
Alan Cox [Thu, 9 Nov 2017 01:19:53 +0000 (01:19 +0000)]
micropack: update MMU definitions

6 years agoz80pack: switch to net_native
Alan Cox [Thu, 9 Nov 2017 01:19:26 +0000 (01:19 +0000)]
z80pack: switch to net_native

Fix some related tty bugs

6 years agonetd: clock types are 32bit
Alan Cox [Wed, 8 Nov 2017 23:30:29 +0000 (23:30 +0000)]
netd: clock types are 32bit

Fixes the crash at startup

6 years agoMerge pull request #543 from beretta42/netd2
EtchedPixels [Wed, 8 Nov 2017 20:18:03 +0000 (20:18 +0000)]
Merge pull request #543 from beretta42/netd2

Fix a few new bugs in netd

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Wed, 8 Nov 2017 20:14:17 +0000 (20:14 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agoMakefile: add a make kclean target
Alan Cox [Wed, 8 Nov 2017 19:56:29 +0000 (19:56 +0000)]
Makefile: add a make kclean target

6 years agosyscal_exec16: Fix two bugs
Alan Cox [Wed, 8 Nov 2017 19:54:18 +0000 (19:54 +0000)]
syscal_exec16: Fix two bugs

1. Potential race on reference to hdr
2. If we tried to exec an r/o file and failed we could end up being marked
non coredumping

6 years agoexec32: move to readi
Alan Cox [Wed, 8 Nov 2017 19:53:57 +0000 (19:53 +0000)]
exec32: move to readi

6 years agoubee: keep the incomplete port in sync
Alan Cox [Wed, 8 Nov 2017 19:18:17 +0000 (19:18 +0000)]
ubee: keep the incomplete port in sync

6 years agoz80: align more platforms
Alan Cox [Wed, 8 Nov 2017 17:50:31 +0000 (17:50 +0000)]
z80: align more platforms
\vx

6 years agotrs80: align with current kernel
Alan Cox [Wed, 8 Nov 2017 17:46:23 +0000 (17:46 +0000)]
trs80: align with current kernel

6 years agomsx1: align with current
Alan Cox [Wed, 8 Nov 2017 17:45:35 +0000 (17:45 +0000)]
msx1: align with current

6 years agozetav2: update to current kernel core
Alan Cox [Wed, 8 Nov 2017 17:09:14 +0000 (17:09 +0000)]
zetav2: update to current kernel core

6 years agosocz80: align with current code
Alan Cox [Wed, 8 Nov 2017 16:42:26 +0000 (16:42 +0000)]
socz80: align with current code

6 years agodevfd: clean up for current I/O layer
Alan Cox [Wed, 8 Nov 2017 16:26:04 +0000 (16:26 +0000)]
devfd: clean up for current I/O layer

6 years agonc100: align with core changes
Alan Cox [Wed, 8 Nov 2017 15:57:50 +0000 (15:57 +0000)]
nc100: align with core changes

6 years agoz180: no MMU hooks
Alan Cox [Wed, 8 Nov 2017 15:54:01 +0000 (15:54 +0000)]
z180: no MMU hooks

The Z180 MMU is built in

6 years agoremount: fix a corner case
Alan Cox [Wed, 8 Nov 2017 15:53:12 +0000 (15:53 +0000)]
remount: fix a corner case

If we have a file open that has no on disk references then irrespective of
whether we have it open for read or not we cannot make the disk read only
because we need to write to erase the file on close.

6 years agosyscall_fs: stop pipe() working with a r/o fs backing it
Alan Cox [Wed, 8 Nov 2017 15:52:47 +0000 (15:52 +0000)]
syscall_fs: stop pipe() working with a r/o fs backing it

6 years agoz80: shave off a few bytes
Alan Cox [Wed, 8 Nov 2017 15:50:59 +0000 (15:50 +0000)]
z80: shave off a few bytes

6 years agodevrd: bring up to match current I/O layer
Alan Cox [Wed, 8 Nov 2017 15:50:32 +0000 (15:50 +0000)]
devrd: bring up to match current I/O layer

Makes it a lot shorter and to the point.

6 years agokernel: Fix level 1 build
Alan Cox [Wed, 8 Nov 2017 15:29:23 +0000 (15:29 +0000)]
kernel: Fix level 1 build

6 years agoz80: start bringing platforms into line with core updates
Alan Cox [Wed, 8 Nov 2017 15:28:51 +0000 (15:28 +0000)]
z80: start bringing platforms into line with core updates

6 years agonetd: fix slip definition to match header
Brett Gordon [Wed, 8 Nov 2017 13:42:35 +0000 (08:42 -0500)]
netd: fix slip definition to match header

6 years agonetd: fixup arp switch typing, include in device driver header
Brett Gordon [Wed, 8 Nov 2017 06:16:45 +0000 (01:16 -0500)]
netd: fixup arp switch typing, include in device driver header

6 years agonetd: correct lwwire poll returning -1 for no reason.
Brett Gordon [Wed, 8 Nov 2017 04:41:40 +0000 (23:41 -0500)]
netd: correct lwwire poll returning -1 for no reason.

6 years agoMerge pull request #542 from beretta42/as
EtchedPixels [Tue, 7 Nov 2017 22:55:25 +0000 (22:55 +0000)]
Merge pull request #542 from beretta42/as

as & du: quick fixes to get things compiling

6 years agoMWC: du: make 'dufork' definition match declaration
Brett Gordon [Tue, 7 Nov 2017 05:07:23 +0000 (00:07 -0500)]
MWC: du: make 'dufork' definition match declaration

6 years agoMWC: specify SRCS for 'du'
Brett Gordon [Tue, 7 Nov 2017 05:06:45 +0000 (00:06 -0500)]
MWC: specify SRCS for 'du'

6 years agoas: make z80 assembler
Brett Gordon [Tue, 7 Nov 2017 05:05:35 +0000 (00:05 -0500)]
as: make z80 assembler

6 years agobasic: snapshot further work
Alan Cox [Sun, 5 Nov 2017 22:04:25 +0000 (22:04 +0000)]
basic: snapshot further work

Add all the ECMA55 tokens as a base point
Rework the expression evaluator to be a lot simpler cleaner and also fix bugs

Still need to fix the logic for function(param1,param2)

6 years agobaisc: nothing to see here - putting the framework together for it
Alan Cox [Sat, 4 Nov 2017 21:01:16 +0000 (21:01 +0000)]
baisc: nothing to see here - putting the framework together for it

6 years agonetd: final warnings and silly typecase fix
Alan Cox [Sat, 4 Nov 2017 11:47:32 +0000 (11:47 +0000)]
netd: final warnings and silly typecase fix

6 years agonetd: first attempt at decoding loopback correctly for non ARP protocols
Alan Cox [Sat, 4 Nov 2017 11:44:06 +0000 (11:44 +0000)]
netd: first attempt at decoding loopback correctly for non ARP protocols

6 years agoslip: fix build bug
Alan Cox [Sat, 4 Nov 2017 11:44:00 +0000 (11:44 +0000)]
slip: fix build bug

6 years agoedL: Add a cleaned up port of the MWC ed
Alan Cox [Sat, 4 Nov 2017 01:43:29 +0000 (01:43 +0000)]
edL: Add a cleaned up port of the MWC ed

It's a bit bigger than the utils ed but seems to work rather better. Not
sure which ed will be best - next experiment may be the v7 one 8)

6 years agonetd: first cut at a slip driver
Alan Cox [Fri, 3 Nov 2017 23:43:34 +0000 (23:43 +0000)]
netd: first cut at a slip driver

6 years agonetd: Fix unterminated comment
Alan Cox [Fri, 3 Nov 2017 23:42:13 +0000 (23:42 +0000)]
netd: Fix unterminated comment

6 years agonetd: remove duplicate declarations and add the arp flag
Alan Cox [Fri, 3 Nov 2017 23:41:52 +0000 (23:41 +0000)]
netd: remove duplicate declarations and add the arp flag

6 years agofsck: note a performance fix
Alan Cox [Fri, 3 Nov 2017 23:41:39 +0000 (23:41 +0000)]
fsck: note a performance fix

6 years agonetd: clean up for other compilers and add the ability to turn off arp
Alan Cox [Fri, 3 Nov 2017 23:40:57 +0000 (23:40 +0000)]
netd: clean up for other compilers and add the ability to turn off arp

It's not yet enough to run without arp because of our loopback code

6 years agonetd: note clock_arch check to do
Alan Cox [Fri, 3 Nov 2017 23:40:28 +0000 (23:40 +0000)]
netd: note clock_arch check to do

6 years agonetd: gcc can struct assign but not all of its friends can
Alan Cox [Fri, 3 Nov 2017 23:40:02 +0000 (23:40 +0000)]
netd: gcc can struct assign but not all of its friends can

6 years agonetd: add flag so a driver declares if it needs arp
Alan Cox [Fri, 3 Nov 2017 23:39:39 +0000 (23:39 +0000)]
netd: add flag so a driver declares if it needs arp

We'll be needing that shortly

6 years agoprocess: when debugging it's nice to know why something exited
Alan Cox [Fri, 3 Nov 2017 23:37:42 +0000 (23:37 +0000)]
process: when debugging it's nice to know why something exited

6 years agoz80pack: turn on MMU feature
Alan Cox [Fri, 3 Nov 2017 23:37:30 +0000 (23:37 +0000)]
z80pack: turn on MMU feature

6 years agoz80pack: add an extreme example of the mmu hooks
Alan Cox [Fri, 3 Nov 2017 23:36:59 +0000 (23:36 +0000)]
z80pack: add an extreme example of the mmu hooks

6 years agolowlevel-z80: add hooking points for Z80 systems with memory protect bits
Alan Cox [Fri, 3 Nov 2017 23:36:35 +0000 (23:36 +0000)]
lowlevel-z80: add hooking points for Z80 systems with memory protect bits

6 years agoz80pack: we added a tty
Alan Cox [Fri, 3 Nov 2017 23:36:01 +0000 (23:36 +0000)]
z80pack: we added a tty

6 years agoz80pack: drop stuff we don't need
Alan Cox [Fri, 3 Nov 2017 23:35:20 +0000 (23:35 +0000)]
z80pack: drop stuff we don't need

6 years agoibmpc: note older 80x86 errata
Alan Cox [Fri, 3 Nov 2017 23:34:54 +0000 (23:34 +0000)]
ibmpc: note older 80x86 errata

6 years agoz80pack: add the outgoing port as another tty
Alan Cox [Fri, 3 Nov 2017 23:32:48 +0000 (23:32 +0000)]
z80pack: add the outgoing port as another tty

6 years agoz80: fix the banked code FIXME about syscalls.
Alan Cox [Fri, 3 Nov 2017 23:31:58 +0000 (23:31 +0000)]
z80: fix the banked code FIXME about syscalls.

Note the call is also safe as the entry point is not banked

6 years agoz80pack: Fix the printer driver
Alan Cox [Fri, 3 Nov 2017 23:31:37 +0000 (23:31 +0000)]
z80pack: Fix the printer driver

6 years agodu: switch version
Alan Cox [Fri, 3 Nov 2017 12:23:32 +0000 (12:23 +0000)]
du: switch version

Use the tidied up MWC one. It's nicer, smaller and calculates stuff like
indirect block cost.

6 years agoas: bracket or square...
Alan Cox [Thu, 2 Nov 2017 18:18:09 +0000 (18:18 +0000)]
as: bracket or square...

Z80 and 6502 use () to indicate a layer of indirection, so the assembler uses
[] for expressions

6809 uses [] for indirect, so we need to use () for expressions

6 years agoas: incomplete 6809 code
Alan Cox [Thu, 2 Nov 2017 18:17:11 +0000 (18:17 +0000)]
as: incomplete 6809 code

Doesn't build yet but I figure we might as well make all of our platforms
able to use the same object file format, linker, library tools for self hosting
work.

6 years agoas: Fix more bugs, add < and > for lo/hi relocations
Alan Cox [Tue, 31 Oct 2017 21:40:35 +0000 (21:40 +0000)]
as: Fix more bugs, add < and > for lo/hi relocations

Still plenty of bugs I am sure.

6 years agoas further work
Alan Cox [Tue, 31 Oct 2017 20:48:32 +0000 (20:48 +0000)]
as further work

- Initial core support for word addressed machines
- Sketch out a compilable DG Nova PoC for this
- PC relative addressing

6 years agold: first cut at big endian logic, pcrel, overflow suppression and high8
Alan Cox [Tue, 31 Oct 2017 20:47:03 +0000 (20:47 +0000)]
ld: first cut at big endian logic, pcrel, overflow suppression and high8

6 years agoobj: add proper PCREL definitions for relocation entries
Alan Cox [Tue, 31 Oct 2017 13:44:28 +0000 (13:44 +0000)]
obj: add proper PCREL definitions for relocation entries

We can generate them but not yet link them

6 years agoas4: add relative byte output
Alan Cox [Tue, 31 Oct 2017 12:28:05 +0000 (12:28 +0000)]
as4: add relative byte output

6 years agoasz80: improve handling of segment type clashes
Alan Cox [Tue, 31 Oct 2017 12:27:45 +0000 (12:27 +0000)]
asz80: improve handling of segment type clashes

6 years agold: teach new tags, and make it reject them also tidy segment constraints
Alan Cox [Tue, 31 Oct 2017 12:26:54 +0000 (12:26 +0000)]
ld: teach new tags, and make it reject them also tidy segment constraints

6 years agoobj: update with endian and word tags and some oddments
Alan Cox [Tue, 31 Oct 2017 12:26:34 +0000 (12:26 +0000)]
obj: update with endian and word tags and some oddments

6 years agoas: lots of stuff here
Alan Cox [Mon, 30 Oct 2017 23:44:05 +0000 (23:44 +0000)]
as: lots of stuff here

- Rework types for cpu / flags
- Add 6502 types
- Teach ld that there can be a ZP segment
- Restructure the assembler to put arch specific code in less files
- Fix various minor bugs (segment checking etc)
- Fix a bug where a_sym was not reliably set to NULL for constants
- Add initial test 6502 support to prove can re-target easily

6 years agoasz80: Z180 initial support, fix range checking, correct IX disp non abs
Alan Cox [Mon, 30 Oct 2017 17:42:47 +0000 (17:42 +0000)]
asz80: Z180 initial support, fix range checking, correct IX disp non abs

In particular

out (300),a  errors
ld (ix+300),a errors

ld (ix+FOO),a generates a relocation entry for FOO

That means you can

FOO .equ 21

ld (ix+FOO),a

or even define FOO as an external

6 years agold: don't break if the symbol unused bytes are nn zero
Alan Cox [Mon, 30 Oct 2017 17:42:25 +0000 (17:42 +0000)]
ld: don't break if the symbol unused bytes are nn zero

6 years agold: add the hash function
Alan Cox [Mon, 30 Oct 2017 17:40:58 +0000 (17:40 +0000)]
ld: add the hash function

6 years agoobj: make Z80 an 8080 variant as this makes more sense
Alan Cox [Mon, 30 Oct 2017 17:40:38 +0000 (17:40 +0000)]
obj: make Z80 an 8080 variant as this makes more sense

6 years agoSmallC: Fix initialization of static/global pointers
Alan Cox [Sun, 29 Oct 2017 18:28:23 +0000 (18:28 +0000)]
SmallC: Fix initialization of static/global pointers

It's trivial to add the code generation for this and it's an annoying lack in
the compiler.

6 years agosmallc: tidy up a bit, align Z80 with assembler and fix bogus pop bc bug
Alan Cox [Sun, 29 Oct 2017 18:07:14 +0000 (18:07 +0000)]
smallc: tidy up a bit, align Z80 with assembler and fix bogus pop bc bug

6 years agold: tidy up pass
Alan Cox [Sun, 29 Oct 2017 17:36:50 +0000 (17:36 +0000)]
ld: tidy up pass

6 years agold: furthr polishing
Alan Cox [Sun, 29 Oct 2017 17:31:18 +0000 (17:31 +0000)]
ld: furthr polishing

At this point it appears to be functioal

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sun, 29 Oct 2017 16:37:08 +0000 (16:37 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agold: Save current status
Alan Cox [Sun, 29 Oct 2017 16:36:27 +0000 (16:36 +0000)]
ld: Save current status

Libraries work
Still doing some final debug on symbol resolutions
Unbreak handling of internal symbols

6 years agoobj.h: add 'ANY' segment definition
Alan Cox [Sun, 29 Oct 2017 16:35:51 +0000 (16:35 +0000)]
obj.h: add 'ANY' segment definition

6 years agonm: understand the fact a U symbol may be segment constrained
Alan Cox [Sun, 29 Oct 2017 16:35:38 +0000 (16:35 +0000)]
nm: understand the fact a U symbol may be segment constrained

6 years agoas: fix handling of unknown symbols in subtraction
Alan Cox [Sun, 29 Oct 2017 16:34:19 +0000 (16:34 +0000)]
as: fix handling of unknown symbols in subtraction

Propogate segment requirements to object module for linker to fault

6 years agoas: fix blkb/defs
Alan Cox [Sun, 29 Oct 2017 16:33:43 +0000 (16:33 +0000)]
as: fix blkb/defs

We make it twice the size and get very confused as a result

6 years agoMerge pull request #540 from beretta42/mem
EtchedPixels [Sun, 29 Oct 2017 13:41:52 +0000 (13:41 +0000)]
Merge pull request #540 from beretta42/mem

bank16k: report correct memory used

6 years agobank16k: report correct memory used
Brett Gordon [Sun, 29 Oct 2017 08:24:56 +0000 (04:24 -0400)]
bank16k: report correct memory used

pfptr goes down as memory is allocated. return it's compliement instead.

6 years agold: closer but not yet entirely correct
Alan Cox [Sat, 28 Oct 2017 23:17:34 +0000 (00:17 +0100)]
ld: closer but not yet entirely correct

6 years agold: further updates
Alan Cox [Sat, 28 Oct 2017 22:25:13 +0000 (23:25 +0100)]
ld: further updates

At this point we can do some minimal linking and write out correctly looking
objects.

6 years agoasz80: fixes to output format logic
Alan Cox [Sat, 28 Oct 2017 22:24:59 +0000 (23:24 +0100)]
asz80: fixes to output format logic

6 years agoobj: format tweaking
Alan Cox [Sat, 28 Oct 2017 22:24:46 +0000 (23:24 +0100)]
obj: format tweaking

6 years agoREADME: updates
Alan Cox [Sat, 28 Oct 2017 18:13:10 +0000 (19:13 +0100)]
README: updates

- We now have a useful gcc 8086, in fact at many things it rocks.
- SDCC is ever improving

6 years agold: Fix some stuff by inspection and fold in basic logic for library modules
Alan Cox [Sat, 28 Oct 2017 18:03:42 +0000 (19:03 +0100)]
ld: Fix some stuff by inspection and fold in basic logic for library modules

6 years agold: first parts of a linker
Alan Cox [Sat, 28 Oct 2017 17:41:50 +0000 (18:41 +0100)]
ld: first parts of a linker

Far from complete!

6 years agoz80as: change object file format to fixed sized symbol records
Alan Cox [Sat, 28 Oct 2017 17:41:19 +0000 (18:41 +0100)]
z80as: change object file format to fixed sized symbol records

This makes life a lot easier for the other tools