English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 23 January 2024, 21:09   #1
fuzzylogic
Registered User
 
Join Date: Jan 2010
Location: Germany
Posts: 67
VASM and BKPT

Hello it's me again with a VASM (or better said assembly question)

If I take a look into the MC68000 manual I see a mnemonic called BKPT. In the manual it is said that this is for MC68EC000, MC68010, MC68020,
MC68030, MC68040, CPU32.

When I try to assemble with VASM:

Code:
BKPT #7
It gives me an error:

Code:
error 9 in line 1 of "test.s": instruction not supported on selected architecture
>       bkpt    #7
So it won't let me do that. Strange since it should work for 68EC000.

Then I made a quick test: I put all the bits described in the m68k manual by hand for "BKPT #7" which gave me opcode $484F.

Bits:
Code:
0100100001001111 => $484F
After that I booted up my Amiga which has an Action Replay III attached. I put this opcode somewhere in RAM ($50000). Then I made a "d $50000" to see what the AR3 will show for this opcode, it was:

Code:
PEA A7
Does anyone have an explanation for this?

Last edited by fuzzylogic; 23 January 2024 at 21:10. Reason: typo
fuzzylogic is offline  
Old 23 January 2024, 21:24   #2
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
I never heard about bkpt instruction. Perhaps pea is correct name.
Don_Adan is offline  
Old 23 January 2024, 21:40   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
Quote:
Originally Posted by fuzzylogic View Post
If I take a look into the MC68000 manual I see a mnemonic called BKPT. In the manual it is said that this is for MC68EC000, MC68010, MC68020,MC68030, MC68040, CPU32.
vasm doesn't differentiate between 68000 and 68ec000. Maybe it should, as there are some more instructions which are 68ec000 specific, like move from SR.

EDIT: Checked the whole PRM, but BKPT remains the only instruction which differs between 68000 and 68ec000 (if this is not a bug in the Rev.1 M68000PM/AD. Move from SR is supervisor-only on 68ec000, but this makes not differences for the assembler. Interesting. Didn't know about BKPT on 68ec000.

Try to assemble for 68010 and
bkpt
will work.

Quote:
Code:
PEA A7
Does anyone have an explanation for this?
Bug in the AR3 disassembler.

Last edited by phx; 23 January 2024 at 21:51. Reason: Some investigation.
phx is offline  
Old 24 January 2024, 08:02   #4
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
Unless you are using special hardware that can catch the breakpoint acknowledge bus cycle (which is different between 68010 and 68020, missing in 68000 and perhaps again different in 68040+), bkpt does nothing but trigger an illegal opcode exception. So in some way, it works for 68000 too.
At least Devpac3 assembles it even in 68000 mode (phxass needs 68010).
meynaf is offline  
Old 24 January 2024, 17:03   #5
fuzzylogic
Registered User
 
Join Date: Jan 2010
Location: Germany
Posts: 67
Thanks guys for the clarification. I have never seen this before and was wondering.
fuzzylogic is offline  
Old 25 January 2024, 01:25   #6
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
Does anybody know if the 68ec000 does a breakpoint acknowledge bus cycle? I would expect that. Otherwise there is no reason to document that the
bkpt
instruction is available on the 68ec000, but not on the 68000.

And is there a difference between the 68ec000 and the 68sec000? I have the latter in my Minimig and could do some tests.
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vasm freehand Coders. Asm / Hardware 2 25 November 2023 23:51
Question about XREF vs XDEF (vasm 1.8 vs vasm 1.9) roondar Coders. Asm / Hardware 8 01 May 2023 20:59
Another Vasm question LeCaravage Coders. Asm / Hardware 7 27 January 2021 23:30
Vasm division by 0 Quagliarulo Coders. Asm / Hardware 4 27 July 2020 11:30
vasm 1.5 RFC phx Coders. General 30 11 December 2010 02:08

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:49.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07093 seconds with 13 queries