Some people claim thar the 6502 is a RISC processor.
-
@revk @etchedpixels @kbm0 @brouhaha @phloggen
It's been possible through, dark arts and necromancy, to add a protected mode to the Z80, which would have been very cool in 1989

GitHub - Andy18650/HEC-Model-Z1: A Z80 computer with protected mode support
A Z80 computer with protected mode support. Contribute to Andy18650/HEC-Model-Z1 development by creating an account on GitHub.
GitHub (github.com)
@simonzerafa @revk @kbm0 @brouhaha @phloggen it was done in the 1980s by Morrow
-
@revk @etchedpixels @kbm0 @brouhaha @phloggen
I've since learned that the Z80 was a very capable CPU but somewhat hamstring by the platforms that used it

No such issues with 6502 based CPU platforms

@simonzerafa @etchedpixels @kbm0 @brouhaha @phloggen 6502 BRK was uses creatively by BBC Micro as I recall.
-
@simonzerafa @etchedpixels @kbm0 @brouhaha @phloggen 6502 BRK was uses creatively by BBC Micro as I recall.
@revk @simonzerafa @kbm0 @brouhaha @phloggen BBC uses JSR vectors in top of memory BRK on classic 6502 is buggy and cannot be combined reliably with interrupts so it's not really used for anything serious
-
@revk @simonzerafa @kbm0 @brouhaha @phloggen BBC uses JSR vectors in top of memory BRK on classic 6502 is buggy and cannot be combined reliably with interrupts so it's not really used for anything serious
@etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen Yeh I may be misremembering, to be honest, long time ago.
-
R relay@relay.infosec.exchange shared this topic
-
@etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen Yeh I may be misremembering, to be honest, long time ago.
@revk @simonzerafa @kbm0 @brouhaha @phloggen some 680x machines use SWI this way (equivalent of BRK) but BRK is really limited to dropping into the debugger until 65C02 annoyingly as I did want to use BRK for Fuzix syscalls on 6502
-
@simonzerafa @etchedpixels @kbm0 @brouhaha @phloggen I learned Z80 first but prefer 6502. On one occasion I had to code the same thing for both, which was, interesting.
@revk @simonzerafa @kbm0 @brouhaha @phloggen carry flag always gets me on 6502 when switching the CPU I am working with 6800 series, 8080 series and most others it's the other way around on subtract
-
@etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen Yeh I may be misremembering, to be honest, long time ago.
@revk @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen By default on the Acorn 8-bit OS, the IRQ/BRK vector (0xfffe) redirects into ROM, which then splits it depending on the I flag.
If it is a BRK, then it will pull the calling address from stack and store the following address in 0x00ED and 0x00FE and then jump to the code pointed to by 0x0202. By default this will print the null terminated ASCII message after the BRK.
For example:

-
@revk @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen By default on the Acorn 8-bit OS, the IRQ/BRK vector (0xfffe) redirects into ROM, which then splits it depending on the I flag.
If it is a BRK, then it will pull the calling address from stack and store the following address in 0x00ED and 0x00FE and then jump to the code pointed to by 0x0202. By default this will print the null terminated ASCII message after the BRK.
For example:

@revk @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen
There is a warning in the Advanced User guide about using this for anything complex:
"Note that although a fully prepared exit from a BRK instruction
is possible, neither the operating system or BASIC expect a
return from this vector. Possibly fatal results may occur if such
a return is made as paged ROM software typically stores the
BRK, error number and message in page one below the stack,
returning there is very hazardous. The exception to this is when
using the BRK instruction as a breakpoint in user supplied
machine code, and is not used as a standard error generating
mechanism." -
@revk @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen By default on the Acorn 8-bit OS, the IRQ/BRK vector (0xfffe) redirects into ROM, which then splits it depending on the I flag.
If it is a BRK, then it will pull the calling address from stack and store the following address in 0x00ED and 0x00FE and then jump to the code pointed to by 0x0202. By default this will print the null terminated ASCII message after the BRK.
For example:

@tautology @revk @etchedpixels @simonzerafa @brouhaha @phloggen What causes a "Bad ROM"? Is that what you get if you pull the BASIC ROM out?
-
The DG Nova was the first RISC, and anybody who wants to argue otherwise must bring an architecture with less than 18 instructions to the debate.
@phloggen @brouhaha Hmm less than 18; Manchester Baby 1948 - 7 instructions; https://en.wikipedia.org/wiki/Manchester_Baby#Programming
-
@revk @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen
There is a warning in the Advanced User guide about using this for anything complex:
"Note that although a fully prepared exit from a BRK instruction
is possible, neither the operating system or BASIC expect a
return from this vector. Possibly fatal results may occur if such
a return is made as paged ROM software typically stores the
BRK, error number and message in page one below the stack,
returning there is very hazardous. The exception to this is when
using the BRK instruction as a breakpoint in user supplied
machine code, and is not used as a standard error generating
mechanism."@tautology @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen The paged ROMs were fun. I have one application that actually took up two slots with calls between them - all good fun.
-
@tautology @etchedpixels @simonzerafa @kbm0 @brouhaha @phloggen The paged ROMs were fun. I have one application that actually took up two slots with calls between them - all good fun.
@revk @tautology @etchedpixels @simonzerafa @brouhaha @phloggen You could make a cheap "sideways RAM" board with static RAM mapped into the ROM slots.
-
@revk @tautology @etchedpixels @simonzerafa @brouhaha @phloggen You could make a cheap "sideways RAM" board with static RAM mapped into the ROM slots.
@revk @tautology @etchedpixels @simonzerafa @brouhaha @phloggen I seem to remember there was a romsel header on the BBC B that could address up to 16 ROMs. You had to steal the R/W line from somewhere else on the board.
-
The DG Nova was the first RISC, and anybody who wants to argue otherwise must bring an architecture with less than 18 instructions to the debate.
-
@tautology @revk @etchedpixels @simonzerafa @brouhaha @phloggen What causes a "Bad ROM"? Is that what you get if you pull the BASIC ROM out?
@kbm0 @revk @etchedpixels @simonzerafa @brouhaha @phloggen that code was in the middle of the ROMFS code (where it treats a ROM like a virtual tape), and the code before it looks for valid codes for a tape file header, so it's the error when you try and use ROMFS on a non-ROMFS ROM.
-
@kbm0 @revk @etchedpixels @simonzerafa @brouhaha @phloggen that code was in the middle of the ROMFS code (where it treats a ROM like a virtual tape), and the code before it looks for valid codes for a tape file header, so it's the error when you try and use ROMFS on a non-ROMFS ROM.
@tautology @revk @etchedpixels @simonzerafa @brouhaha @phloggen Not sure I ever encountered a ROMFS ROM in anger... I remember there was that whole thing with speech "phROMs" and that mysterious cutout on the LHS of the keyboard that nobody ever used. Features mandated by the educational spec of the Beeb micro I expect.
-
The DG Nova was the first RISC, and anybody who wants to argue otherwise must bring an architecture with less than 18 instructions to the debate.
-
@tautology @revk @etchedpixels @simonzerafa @brouhaha @phloggen Not sure I ever encountered a ROMFS ROM in anger... I remember there was that whole thing with speech "phROMs" and that mysterious cutout on the LHS of the keyboard that nobody ever used. Features mandated by the educational spec of the Beeb micro I expect.
@kbm0 @revk @etchedpixels @simonzerafa @brouhaha @phloggen some of the Acornsoft releases on the Electron / Master used ROMFS as it made it really quick to convert a BASIC tape to a plug in ROM.
-
@revk @etchedpixels @kbm0 @brouhaha @phloggen
It's been possible through, dark arts and necromancy, to add a protected mode to the Z80, which would have been very cool in 1989

GitHub - Andy18650/HEC-Model-Z1: A Z80 computer with protected mode support
A Z80 computer with protected mode support. Contribute to Andy18650/HEC-Model-Z1 development by creating an account on GitHub.
GitHub (github.com)
@simonzerafa @revk @etchedpixels @kbm0 @phloggen
You can add a "protected mode" by adding additional logic to any processor. It was done in 1982 or so by Motorola for the MC6809, by way of the MC6829 MMU chip, which of course also added memory mapping. The MC6829 could also be used by other microprocessors with a synchronous bus, including the 6502.
1/ -
@simonzerafa @etchedpixels @kbm0 @brouhaha @phloggen 6502 BRK was uses creatively by BBC Micro as I recall.
@revk @simonzerafa @etchedpixels @kbm0 @brouhaha @phloggen Best use of BRK is in the Atari 2600 F1 racing game where the fact that it pushes 3 items onto the stack in one instruction is used to to perform 3 distinct sprite operations in one go, drawing the left and right side of the race track in the distance that would otherwise be too close to represent as distinct operations.