• 68020 supervisor/user state

    From Roger Hanscom@21:1/5 to All on Sun Oct 22 17:51:10 2023
    What is bit 13 (supervisor/user) set to at reset on a 68020? I'm running a monitor, that was written for the 68000, on a homebrew 68020 SBC. The only reference I can find in the monitor code to the SR is a "ANDI.W #$7FFF,SR" early on to disable tracing.
    BUT, when I do this:

    -s420
    00000420 00 42
    00000421 00 80
    00000422 00 40
    00000423 00 c0
    00000424 00 60
    00000425 00 fa
    00000426 00 .
    -g420
    Privilege Violation at 00000422
    PC=00000422 USP=00001000 SSP=0001A924 ST=0004=>IM=0 ZER
    VBR=00000000 SFC=7 DFC=7
    D 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    A 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001000 move.w SR,D0

    You can see the privilege violation. What's the trick to put the 68020 in supervisor mode? This is a small footprint, single user SBC so the distinction between supervisor and user isn't very useful.

    Roger

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Schultz@21:1/5 to Roger Hanscom on Mon Oct 23 08:38:21 2023
    On 10/22/23 7:51 PM, Roger Hanscom wrote:
    You can see the privilege violation. What's the trick to put the 68020 in supervisor mode? This is a small footprint, single user SBC so the distinction between supervisor and user isn't very useful.

    Exceptions switch to a privileged state but the S bit should be set
    coming out of reset. So something is causing the switch to user mode.


    --
    http://davesrocketworks.com
    David Schultz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)