18 December 2019, 22:08 | #1 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
movec on 68000
I'm converting ministartup from here: http://stingray.untergrund.net/MiniStartup.s and stumbled over this part:
Code:
.GetVBR move.l a5,-(a7) moveq #0,d0 ; default at $0 move.l $4.w,a6 btst #0,296+1(a6) ; 68010+? beq.b .is68k ; nope. lea .getit(pc),a5 jsr -30(a6) ; SuperVisor() .is68k move.l (a7)+,a5 rts .getit movec vbr,d0 rte ; back to user state code It executes the "movec" privileged instruction which is AFAIK an 68010+ instruction, right? So I get an error from vasm because I'm targetting 68000: instruction not supported on selected architecture And I wonder how to work around this, as I'm not sure what exactly it does. |
18 December 2019, 22:24 | #2 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,994
|
Change the line MOVEC VBR,d0 to this:
dc.l $4E7A0801 VBR = Vector Base Register. On a 68000 the VBR cannot be moved, so the base address is $0. The Vector Base is the area of memory where the vectors are stored, so thats BUS ERROR etc and of course the interrupts. On 68010+ the Vector Base can be repositioned, and all those interrupts will also be moved. |
18 December 2019, 22:40 | #3 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
Thanks. I enabled 68010 instruction set. I was trying to find the encoding for the instruction.
|
19 December 2019, 13:28 | #4 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
this should do it:
mc68020 movec vbr,d0 mc68000 |
19 December 2019, 13:32 | #5 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
Thanks! I was looking on how to enable an architecture for only some instructions, but I haven't found this in the docs. This is much better, as I want to target 68000 and I wouldn't like to slip in other instructions by accident, as it would be possible at the moment.
|
19 December 2019, 13:40 | #6 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,994
|
Quote:
|
|
19 December 2019, 14:23 | #7 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
Yes, But it should be there, in case it is executed on a different machine, right? So the code wouldn't work, if the program would be started on some A1200 or so.
|
19 December 2019, 15:08 | #8 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
ministartup works perfectly well on all Amigas / processors / configs
On 68000, the movec part is never called, so it's just in effect some bytes in memory |
19 December 2019, 15:44 | #9 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
Yes, thats why I left it in. I could have removed that part, but then it wouldn't work properly on other Amigas.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
68000 6888x | Seiya | support.WinUAE | 5 | 05 December 2017 20:50 |
How to disable caches using MOVEC => CACR | jotd | Coders. Asm / Hardware | 12 | 07 November 2017 20:45 |
68000 motorola | alex68 | support.Hardware | 84 | 23 January 2017 21:30 |
68000 optimisation | Galahad/FLT | Coders. Asm / Hardware | 9 | 20 August 2016 00:29 |
68000 Emulation | buggs | support.FS-UAE | 0 | 29 May 2016 13:35 |
|
|