FUZIX.git
9 years agotrs80: move to E800
Alan Cox [Thu, 18 Dec 2014 21:31:04 +0000 (21:31 +0000)]
trs80: move to E800

Make room make room

9 years agomtx; switch to the shared z80 banking code
Alan Cox [Thu, 18 Dec 2014 21:30:05 +0000 (21:30 +0000)]
mtx; switch to the shared z80 banking code

9 years agoz80: introduce a common z80fixedbank.s
Alan Cox [Thu, 18 Dec 2014 21:29:04 +0000 (21:29 +0000)]
z80: introduce a common z80fixedbank.s

This is sufficient for most setups using fixed banks and a common.

9 years agotrs80: bring things up to the bootdev prompt
Alan Cox [Thu, 18 Dec 2014 11:56:39 +0000 (11:56 +0000)]
trs80: bring things up to the bootdev prompt

Somewhat of a redesign of the original guesswork.

9 years agovt: Fixes for the simple vt code
Alan Cox [Thu, 18 Dec 2014 11:55:47 +0000 (11:55 +0000)]
vt: Fixes for the simple vt code

Work around what appears to be an sdcc bug
Allow cursor_off to be called first without writing over address 0

9 years agostart: remove old tty debug, and fix mix of (c) and (C)
Alan Cox [Thu, 18 Dec 2014 11:55:14 +0000 (11:55 +0000)]
start: remove old tty debug, and fix mix of (c) and (C)

9 years agotrs80load: TRS80 loader
Alan Cox [Thu, 18 Dec 2014 00:53:20 +0000 (00:53 +0000)]
trs80load: TRS80 loader

Assumes single sided double density disk. Sets up the memory map, moves itself
to 0x00-0xff and then loads the kernel at 0x100 before running it.

9 years agotrs80: move udata and program top
Alan Cox [Thu, 18 Dec 2014 00:52:24 +0000 (00:52 +0000)]
trs80: move udata and program top

Matches the linker and allows for the fact that F400-FFFF is occupied by
the keyboard mmio and the video map

9 years agoprocess: flag a tiny race
Alan Cox [Thu, 18 Dec 2014 00:51:12 +0000 (00:51 +0000)]
process: flag a tiny race

I think we can just remove the restore, but needs checking over

9 years agotrs80,floppy: bug fixes noticed in passing
Alan Cox [Thu, 18 Dec 2014 00:50:46 +0000 (00:50 +0000)]
trs80,floppy: bug fixes noticed in passing

9 years agotrs80: update config.h
Alan Cox [Thu, 18 Dec 2014 00:50:20 +0000 (00:50 +0000)]
trs80: update config.h

9 years agotrs80: Add a tool to build the needed jv3 images
Alan Cox [Thu, 18 Dec 2014 00:49:53 +0000 (00:49 +0000)]
trs80: Add a tool to build the needed jv3 images

9 years agotrs80: adjust link map to make more sense
Alan Cox [Thu, 18 Dec 2014 00:49:29 +0000 (00:49 +0000)]
trs80: adjust link map to make more sense

9 years agomtx: now the serial is sorted remove the polling
Alan Cox [Thu, 18 Dec 2014 00:48:23 +0000 (00:48 +0000)]
mtx: now the serial is sorted remove the polling

9 years ago6502: Clean up the expanded 6502 bits
Alan Cox [Wed, 17 Dec 2014 00:33:11 +0000 (00:33 +0000)]
6502: Clean up the expanded 6502 bits

This now assembles at least, I doubt it actually does anything useful.

9 years agoTODO: update done stuff, also fix related comment that was stale
Alan Cox [Tue, 16 Dec 2014 23:42:05 +0000 (23:42 +0000)]
TODO: update done stuff, also fix related comment that was stale

9 years agomtx: Update the floppy code to turn off the motor when its done
Alan Cox [Tue, 16 Dec 2014 23:34:52 +0000 (23:34 +0000)]
mtx: Update the floppy code to turn off the motor when its done

9 years agomtx: update the README
Alan Cox [Tue, 16 Dec 2014 23:34:39 +0000 (23:34 +0000)]
mtx: update the README

9 years agomtx: include a 6x8 font and upload it into the VDP
Alan Cox [Tue, 16 Dec 2014 23:15:08 +0000 (23:15 +0000)]
mtx: include a 6x8 font and upload it into the VDP

We can't it seems rely upon the firmware to have done this for us.

9 years agovt: don't vanish the cursor on vt switches
Alan Cox [Tue, 16 Dec 2014 23:13:30 +0000 (23:13 +0000)]
vt: don't vanish the cursor on vt switches

This will need revisiting because the vt implementations mostly keep a single
'what was under the cursor' and 'cursor address'. We may need to make these
live in a standard place and save them too.

9 years agomtx: tty fixes
Alan Cox [Tue, 16 Dec 2014 23:12:18 +0000 (23:12 +0000)]
mtx: tty fixes

Update comments
Fix the F1/F2 handling
Lock interrupts off to avoid an interrupt messing up a tty update by switching
mid update. This really needs a better model of processing, eg deferring the
echoed character if mid processing

9 years agomtx: correct pagemap loading
Alan Cox [Tue, 16 Dec 2014 23:12:02 +0000 (23:12 +0000)]
mtx: correct pagemap loading

9 years agoz80: note assumption in commonmem sizing
Alan Cox [Tue, 16 Dec 2014 21:12:12 +0000 (21:12 +0000)]
z80: note assumption in commonmem sizing

9 years agomtx: allow some more space during boot by moving _DISCARD a bit
Alan Cox [Tue, 16 Dec 2014 18:36:08 +0000 (18:36 +0000)]
mtx: allow some more space during boot by moving _DISCARD a bit

9 years agofont6x8: Include config.h
Alan Cox [Tue, 16 Dec 2014 18:35:23 +0000 (18:35 +0000)]
font6x8: Include config.h

9 years agofont6x8: Add to Makefile
Alan Cox [Tue, 16 Dec 2014 18:33:55 +0000 (18:33 +0000)]
font6x8: Add to Makefile

Build the 6x8 font when needed

9 years agofont8x8: Shrink font, compensate for base change
Alan Cox [Tue, 16 Dec 2014 18:32:40 +0000 (18:32 +0000)]
font8x8: Shrink font, compensate for base change

It's dumb having the small font 128 symbols long when the first 32 are
weird stuff. Make it 96, and shift by 32 chars when printing. Saves us 256
bytes

9 years agofont6x8: 6 by 8 font courtesy of LinuxLCD
Alan Cox [Tue, 16 Dec 2014 18:32:01 +0000 (18:32 +0000)]
font6x8: 6 by 8 font courtesy of LinuxLCD

9 years agoREADME: update
Alan Cox [Tue, 16 Dec 2014 18:31:45 +0000 (18:31 +0000)]
README: update

9 years agomtx: Clean up the port and tidy loose ends
Alan Cox [Mon, 15 Dec 2014 22:45:52 +0000 (22:45 +0000)]
mtx: Clean up the port and tidy loose ends

Memory sizing
DART setup
Better CTC configuration
Use IM2 so we can tell CTC and DART interrupts apart

9 years agomtx: README
Alan Cox [Mon, 15 Dec 2014 12:20:36 +0000 (12:20 +0000)]
mtx: README

Explain the shortcut way to load the images

9 years agomtx: clean up caching of page state
Alan Cox [Mon, 15 Dec 2014 12:13:23 +0000 (12:13 +0000)]
mtx: clean up caching of page state

map_restore restored the map but not the cache of the write only port, this
then caused crashes if interrupt returns occurred during a user memory
access.

Use the helpers throughout for neatness

9 years agomtx: mask sector count on side1
Alan Cox [Sun, 14 Dec 2014 23:26:01 +0000 (23:26 +0000)]
mtx: mask sector count on side1

The MTX512 doesn't write sector labels 17-32 on the second side but recycles
1-16

9 years agomtx512: undo that
Alan Cox [Sun, 14 Dec 2014 23:19:29 +0000 (23:19 +0000)]
mtx512: undo that

Amazing what a floppy bug can look like

The disk order is just fine

9 years agomtx512: Add tools for converting fuzix fs images into mfloppy disk format
Alan Cox [Sun, 14 Dec 2014 23:04:43 +0000 (23:04 +0000)]
mtx512: Add tools for converting fuzix fs images into mfloppy disk format

9 years agomtx: 80 column driver
Alan Cox [Sun, 14 Dec 2014 23:01:59 +0000 (23:01 +0000)]
mtx: 80 column driver

Use the crtc to do hardware scrolling

9 years agomtx: Set the crtc up properly
Alan Cox [Sun, 14 Dec 2014 23:01:47 +0000 (23:01 +0000)]
mtx: Set the crtc up properly

9 years agomtx: Further work on the floppy driver
Alan Cox [Sun, 14 Dec 2014 23:00:31 +0000 (23:00 +0000)]
mtx: Further work on the floppy driver

We now load the superblocks and find the inode etc for init

Note that the order on the virtual disk is odd with the second head after
the first full set of tracks

9 years agofsck: bug fixes for big endian fsck on small endian box
Alan Cox [Sun, 14 Dec 2014 22:09:16 +0000 (22:09 +0000)]
fsck: bug fixes for big endian fsck on small endian box

Also change misc because a signed 16bit value swizzled gets 32bit extended
which tripped the sanity checker wrongly

9 years agomtx: fix typo
Alan Cox [Sun, 14 Dec 2014 18:33:07 +0000 (18:33 +0000)]
mtx: fix typo

9 years agomtx: Fix up the consoles and serial
Alan Cox [Sun, 14 Dec 2014 18:26:09 +0000 (18:26 +0000)]
mtx: Fix up the consoles and serial

We now have four tty devices, 1 is the 6845, 2 is the VDP, 3 and 4 the
serial ports. The serial isn't finished and the IRQ logic hasn't been tackled.

The keyboard works.

9 years agovt: Add support for switching vt state
Alan Cox [Sun, 14 Dec 2014 18:24:43 +0000 (18:24 +0000)]
vt: Add support for switching vt state

We need this for the MTX512 but it will also be useful later for MSX, as the
MSX also has a load of VDP RAM that we can use to support multiple text
consoles just like Xenix and later Linux did on a PC.

9 years agovdp1: Allow mixed VDP/non VDP
Alan Cox [Sun, 14 Dec 2014 18:23:06 +0000 (18:23 +0000)]
vdp1: Allow mixed VDP/non VDP

We add a .equ which indicates whether the vdp1 driver should provide the
functions for vt.c or ones that can be wrapped. For MSX we are happy as we
are but for MTX512 we can support a VDP and a 6845 at the same time.

9 years agomtx: Initialize the VDP and use it for vt work
Alan Cox [Sat, 13 Dec 2014 23:56:47 +0000 (23:56 +0000)]
mtx: Initialize the VDP and use it for vt work

Currently this is only half working - we init the vdp but have no font. We
need to upload our own font as CP/M or other boot code might not be using
the VDP display.

9 years agomtx: correct VDP
Alan Cox [Sat, 13 Dec 2014 23:56:19 +0000 (23:56 +0000)]
mtx: correct VDP

Ports 1 and 2 not 0 and 1

9 years agomtx: move things about to allow space for unpack
Alan Cox [Sat, 13 Dec 2014 23:55:50 +0000 (23:55 +0000)]
mtx: move things about to allow space for unpack

Otherwise we fall over ourselves

9 years agomtx: link VIDEO in the right place
Alan Cox [Sat, 13 Dec 2014 23:55:26 +0000 (23:55 +0000)]
mtx: link VIDEO in the right place

9 years agomtx512: Initial port code
Alan Cox [Sat, 13 Dec 2014 22:49:38 +0000 (22:49 +0000)]
mtx512: Initial port code

Not yet bootable.

Still to complete:
CTC setup
DART serial ports
CP/M tools scripts to spit out a memotech floppy disk

9 years agovdp1: Allow the VDP location to be defined not hard coded
Alan Cox [Sat, 13 Dec 2014 22:48:12 +0000 (22:48 +0000)]
vdp1: Allow the VDP location to be defined not hard coded

Not everything with a 9918 in it is an MSX box...

9 years agomicrodrive: move the work buffer somewhere better
Alan Cox [Thu, 11 Dec 2014 22:58:26 +0000 (22:58 +0000)]
microdrive: move the work buffer somewhere better

it was at 0x4000 to help debug, move it offscreen

9 years agozx128, tools: Update bintomdv to upload the entire image
Alan Cox [Thu, 11 Dec 2014 12:12:34 +0000 (12:12 +0000)]
zx128, tools: Update bintomdv to upload the entire image

9 years agomdv: turn on the motor when reading the maps - it helps
Alan Cox [Thu, 11 Dec 2014 12:12:19 +0000 (12:12 +0000)]
mdv: turn on the motor when reading the maps - it helps

9 years agozx128: on a panic halt and spin
Alan Cox [Thu, 11 Dec 2014 12:11:55 +0000 (12:11 +0000)]
zx128: on a panic halt and spin

This makes it much easier to debug in FUSE

9 years agozx128: kernel.def option to decide if we want to microdrive boot
Alan Cox [Thu, 11 Dec 2014 12:11:26 +0000 (12:11 +0000)]
zx128: kernel.def option to decide if we want to microdrive boot

Also use a temporary boot stack for this

9 years agomicrodrive: fix a few bugs
Alan Cox [Thu, 11 Dec 2014 12:10:36 +0000 (12:10 +0000)]
microdrive: fix a few bugs

With this done we can now do all the core bits of loading an image

9 years agozx128, Makefile: add rules for mdv building, rebalance 16K blocks
Alan Cox [Thu, 11 Dec 2014 10:39:28 +0000 (10:39 +0000)]
zx128, Makefile: add rules for mdv building, rebalance 16K blocks

9 years agotrs80: Fix off by one in floppy code
Alan Cox [Wed, 10 Dec 2014 23:29:27 +0000 (23:29 +0000)]
trs80: Fix off by one in floppy code

9 years agobintomdv: convert the binary into microdrive cartridge and interface 2 ROM
Alan Cox [Wed, 10 Dec 2014 23:29:00 +0000 (23:29 +0000)]
bintomdv: convert the binary into microdrive cartridge and interface 2 ROM

9 years agoMakefile: add run for bintomdv
Alan Cox [Wed, 10 Dec 2014 23:28:47 +0000 (23:28 +0000)]
Makefile: add run for bintomdv

9 years agozx128: link and crt0
Alan Cox [Wed, 10 Dec 2014 23:24:55 +0000 (23:24 +0000)]
zx128: link and crt0

Call the microdrive init functions
Do the initializer copy (makes no odds if disk loading, matters if ROM)
Shuffle things so that the kernel is at 0x0000->0x3FFF and 0xC000+. The
common, video and other bits then live between 5B and 9F. That leaves us
with A0-BF free plus the C0-FF of the other banks, so we can run somewhat
bigger apps. Not ideal but SDCC hacking is going to be needed to do better
plus teach fuse to emulate banked cartridges.

Memory map open to discussion anyway.

BUG: right now the mdv loader doesn't load 0xFE00-0xFFFF but needs to, need
to move the boot stack first.

9 years agozx128: put devices in the same order as other platforms, hook microdrive
Alan Cox [Wed, 10 Dec 2014 23:23:49 +0000 (23:23 +0000)]
zx128: put devices in the same order as other platforms, hook microdrive

We'll need some CONFIG options to select between Microdrive, floppy etc as
I don't think the average Russian Spectrum/Clone came with a Microdrive !

9 years agozx128: Add support for the sinclair Microdrive
Alan Cox [Wed, 10 Dec 2014 23:21:30 +0000 (23:21 +0000)]
zx128: Add support for the sinclair Microdrive

Read only for the moment, but tested with the boot loader path and seems to
be doing the right thing. Something is buggy in the checksum logic either
of the mdv maker or the reader, not sure which yet.

Headers and blocks are correctly fetched, data blocks are split from the header
as they arrive to avoid double buffering.

The interface 1 ROM is not used at all (so we can use this from a cartridge
to load the rest of the OS)

9 years agotrs80: further work on the hd driver
Alan Cox [Wed, 10 Dec 2014 23:19:50 +0000 (23:19 +0000)]
trs80: further work on the hd driver

Still needs a floppy boot block to begin testing

9 years agodragon: fix off by one in devfd
Alan Cox [Wed, 10 Dec 2014 23:18:50 +0000 (23:18 +0000)]
dragon: fix off by one in devfd

9 years ago6502: typo fix
Alan Cox [Wed, 10 Dec 2014 23:18:39 +0000 (23:18 +0000)]
6502: typo fix

9 years agofcc: Fix link of start code
Alan Cox [Sun, 7 Dec 2014 14:32:31 +0000 (14:32 +0000)]
fcc: Fix link of start code

From: Will Sowerbutts <will@sowerbutts.com>

crt0.s has lost the 0x100 bytes of space at the start of the executable
image. Attached patch to fcc corrects the link address.

9 years agoqsort: fix sort order
Alan Cox [Sun, 7 Dec 2014 14:31:17 +0000 (14:31 +0000)]
qsort: fix sort order

From: Will Sowerbutts <will@sowerbutts.com>

9 years agossh: fflush the shell prompt
Alan Cox [Sun, 7 Dec 2014 14:29:24 +0000 (14:29 +0000)]
ssh: fflush the shell prompt

From: Will Sowerbutts <will@sowerbutts.com>

The assumption that libc will fflush stdout on an fgets of stdin is not anything
the standards guarantee. Do the needed fflush

9 years agoqsort: fix _wqsort
Alan Cox [Sun, 7 Dec 2014 14:28:20 +0000 (14:28 +0000)]
qsort: fix _wqsort

From: Will Sowerbutts <will@sowerbutts.com>

[and changed from int to short just in case we ever do anything fun with some
 of the odder 32bit CPUs: Alan Cox]

9 years agotrs80: first cut at a WD1010 hard disk driver
Alan Cox [Sat, 6 Dec 2014 23:53:16 +0000 (23:53 +0000)]
trs80: first cut at a WD1010 hard disk driver

9 years agotrs80: first cut at a floppy driver based upon the Dragon work
Alan Cox [Sat, 6 Dec 2014 22:00:25 +0000 (22:00 +0000)]
trs80: first cut at a floppy driver based upon the Dragon work

9 years agodragon: fix floppy warning
Alan Cox [Sat, 6 Dec 2014 21:59:21 +0000 (21:59 +0000)]
dragon: fix floppy warning

9 years agoputdigit: microoptimisations
Alan Cox [Sat, 6 Dec 2014 14:59:40 +0000 (14:59 +0000)]
putdigit: microoptimisations

The compiler can't assume much about the variables after the call to put
the character so do the operations the other way around

9 years agoplatform-dragon: floppy driver updates
Alan Cox [Sat, 6 Dec 2014 14:58:40 +0000 (14:58 +0000)]
platform-dragon: floppy driver updates

It now sort of works but something isn't right in the track handling logic
so that's partly commented out. We issue excess seeks as a result.

9 years agodragon: initial fdc work
Alan Cox [Sat, 6 Dec 2014 02:49:39 +0000 (02:49 +0000)]
dragon: initial fdc work

Now correctly loads the superblock off disk. Something is astray once we
try and seek off track 0 however

9 years agodragon: first cut at a floppy driver
Alan Cox [Fri, 5 Dec 2014 17:55:03 +0000 (17:55 +0000)]
dragon: first cut at a floppy driver

Completely untested at this point

9 years agoREADME.md: update status a bit
Alan Cox [Thu, 4 Dec 2014 11:25:44 +0000 (11:25 +0000)]
README.md: update status a bit

9 years agoMerge pull request #22 from atsidaev/lib-20141204
EtchedPixels [Wed, 3 Dec 2014 22:33:00 +0000 (22:33 +0000)]
Merge pull request #22 from atsidaev/lib-20141204

Library fixes

9 years agovsprintf: 'static' removed from function declaration - making a file compilable with...
Alexander Tsidaev [Wed, 3 Dec 2014 21:39:40 +0000 (16:39 -0500)]
vsprintf: 'static' removed from function declaration - making a file compilable with recent sdcc builds

9 years agoreaddir: string length bug fix
b2m [Wed, 3 Dec 2014 21:35:30 +0000 (16:35 -0500)]
readdir: string length bug fix

If len is 32 (maximum possible value), then we going to write at buf->d_name[31]. Since the d_name length is 31, write is performed outside the string boundaries.

9 years agoREADME.md: typo
Alan Cox [Tue, 2 Dec 2014 00:34:18 +0000 (00:34 +0000)]
README.md: typo

9 years agoStandalone: feel it all through indent
Alan Cox [Mon, 1 Dec 2014 22:27:38 +0000 (22:27 +0000)]
Standalone: feel it all through indent

Now at least its readable and we can begin pruning the large chunks of it that
we don't actually need.

9 years agoutils: Allow for wrong endian file systems
Alan Cox [Sun, 30 Nov 2014 20:57:29 +0000 (20:57 +0000)]
utils: Allow for wrong endian file systems

9 years agoxfs2: auto-switch endianness and fix build bug
Alan Cox [Sun, 30 Nov 2014 20:56:44 +0000 (20:56 +0000)]
xfs2: auto-switch endianness and fix build bug

9 years agomkfs: indent and clean
Alan Cox [Sun, 30 Nov 2014 20:47:06 +0000 (20:47 +0000)]
mkfs: indent and clean

9 years agomkfs: remove dosendian damage
Alan Cox [Sun, 30 Nov 2014 20:44:39 +0000 (20:44 +0000)]
mkfs: remove dosendian damage

9 years agomkfs: add basics to allow wrong endian creation
Alan Cox [Sun, 30 Nov 2014 20:44:03 +0000 (20:44 +0000)]
mkfs: add basics to allow wrong endian creation

9 years agomicropack: Add needed NMOS define
Alan Cox [Sun, 30 Nov 2014 20:37:47 +0000 (20:37 +0000)]
micropack: Add needed NMOS define

9 years agofsck: Support checking a "wong endian" file system
Alan Cox [Sun, 30 Nov 2014 20:37:01 +0000 (20:37 +0000)]
fsck: Support checking a "wong endian" file system

So you can check 6809 file systems on an x86 etc

9 years agoucp: provision for endianness handling
Alan Cox [Sun, 30 Nov 2014 18:27:47 +0000 (18:27 +0000)]
ucp: provision for endianness handling

We are going to need to handle wrong-endian file systems in order to cope
with the 6809 port. Add macros ready

9 years agotimer: fix struct assigns
Alan Cox [Sun, 30 Nov 2014 15:08:24 +0000 (15:08 +0000)]
timer: fix struct assigns

SDCC isn't fond of them so be explicit

9 years agoz80: add different includes for CMOS/NMOS Z80
Alan Cox [Sun, 30 Nov 2014 15:08:04 +0000 (15:08 +0000)]
z80: add different includes for CMOS/NMOS Z80

9 years agoz80: add NMOS v CMOS indicator to all the platforms
Alan Cox [Sun, 30 Nov 2014 15:07:15 +0000 (15:07 +0000)]
z80: add NMOS v CMOS indicator to all the platforms

We need to know this to cover the interrupt erratum in di() and the
flag restore code

9 years agodragon: remove bogus comment
Alan Cox [Sat, 29 Nov 2014 20:55:04 +0000 (20:55 +0000)]
dragon: remove bogus comment

9 years agodragon: remove junk from devtty.h
Alan Cox [Sat, 29 Nov 2014 20:53:37 +0000 (20:53 +0000)]
dragon: remove junk from devtty.h

9 years agousermem_sam: Bug fixes
Alan Cox [Sat, 29 Nov 2014 14:26:17 +0000 (14:26 +0000)]
usermem_sam: Bug fixes

Correct uput
Add interrupt masking otherwise we can take an IRQ while we are within a
usermem access with no valid stack. At that point we crapped a stack frame
somewhere in the wrong memory bank.

9 years agostart: remove bogus copy of const object - make it static const
Alan Cox [Sat, 29 Nov 2014 14:25:44 +0000 (14:25 +0000)]
start: remove bogus copy of const object - make it static const

9 years agotime_t: use a 32bit pair in kernel
Alan Cox [Fri, 28 Nov 2014 22:34:44 +0000 (22:34 +0000)]
time_t: use a 32bit pair in kernel

While SDCC has a full 64bit longlong the other compilers are sadly lacking
at the moment. For the kernel the easiest thing to do is to work in 32bit
chunks, it's not as if the CPU can do better than 16bits at a go anyway

9 years agodevio: tty queue functions are really unsigned char
Alan Cox [Fri, 28 Nov 2014 22:27:17 +0000 (22:27 +0000)]
devio: tty queue functions are really unsigned char

gcc cares so quieten it down

9 years ago6809: Switch to -Os
Alan Cox [Fri, 28 Nov 2014 22:11:06 +0000 (22:11 +0000)]
6809: Switch to -Os

We've updated the helpers so can now do this.

A minimal build 6809 image currently weighs in at 24K code, 8K data. Some
of this is the CPU, some the calling conventions, and some gcc.