Last visit was: Sun Nov 28, 2021 12:12 pm
It is currently Sun Nov 28, 2021 12:12 pm



 [ 14 posts ] 
 Assembling other people's sources 
Author Message

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
Hi guys!
And I didn’t know about this forum! I see a lot of familiar nicknames from the 6502 community here.
Even the mood has risen.
Many years ago I read in some Soviet magazine about the existence of an outstanding, advanced and in
all respects the best microprocessor - MC68000. Of course, it was impossible to get it, but the news
touched me and it still feels like I missed something important. So, I finally decided to take a bit
closer look at this breakthrough of technical thought and found on the Web a simple SBC circuit that I
could quickly solder. It's here:
http://marc.retronik.fr/motorola/68K/68 ... 1-1984.pdf
I have some amateur experience with various electronic gizmos, including simple microprocessors like
the 8080 or z80, and more recently 6502 can be included here, thanks to 6502.org community.
Actually, I am more like a tinkerer than a programmer. I always lacked knowledge in the field of
software and experienced certain difficulties. The 68000 story is no exception.
I ordered parts on Aliexpress, and in the meantime, while there are no parts, I decided to prepare ROMs with a monitor program. The program is called VUBug and its sources are freely available on the net.I took here:
http://marc.retronik.fr/motorola/68K/68000.html
The first attempt in my life to assemble the source code for 68000 failed miserably. Easy68k generated several hundred assembly errors. I decided that maybe another assembler would fit better and took the AS V1.42 (macro assembler by Alfred Arnold). The errors number did not decrease, but they appeared in other places.
What is the correct approach to solving the problem? Manually fix all the places in the source that Easy68k doesn't like?

Thanks
Vladimir

Edit: spelling


Last edited by Vladimir on Fri Oct 22, 2021 1:39 pm, edited 1 time in total.



Fri Oct 22, 2021 8:05 am

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1644
Welcome!

In a situation like this - different assembly syntaxes - I tend to reach for the text-processing tools sed and awk. A text editor with macros might be handy too. But this isn't necessarily the wisest approach!


Fri Oct 22, 2021 12:13 pm

Joined: Wed Nov 20, 2019 12:56 pm
Posts: 76
You could try vasm - its the assembler I tend to use if I need to assemble for 68000.
http://sun.hasenbraten.de/vasm/


Fri Oct 22, 2021 12:32 pm

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
vasm. Doesn't work under Windows XP?
Is there an old version of vasm to run on the Win32 platform?


Fri Oct 22, 2021 2:43 pm

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
I started to manually customize the source to fit the Easy68k syntax. If you need a quick result, then it is excruciating. But, if you have free time, then it may even turn out to be interesting and useful. A very good exercise for learning syntax.
However, along the way, I began to doubt that this was the monitor I needed. The planned SBC has the following address map:

$000000 - $000FFF - ROM
$001000 - $001FFF - RAM

And suddenly in the text I come across 'org $ 4000' ....

In addition, the description says:

VUBUG VER 3.0 PORTEd TO PC FOR ASSEMBLE USING a68K 9/84
VUBUG VER 3.1 FIXED FOR VU68K BOARD 10/86
VUBUG VER 4.0 PORTED TO RAYMATIC 68K BOARD 4/88

and the source text contains the following:

Version 4.0 11 August, 1988

Hence, RAYMATIC? And I was going to do VU68k...
So is it.


Sat Oct 23, 2021 7:25 am

Joined: Mon Oct 07, 2019 2:41 am
Posts: 271
Is this demo style board for the 68000? That is a rather small amount of ram.
Have you seen? http://www.easy68k.com/paulrsm/dg/


Sat Oct 23, 2021 11:07 am

Joined: Wed Nov 20, 2019 12:56 pm
Posts: 76
Vladimir wrote:
vasm. Doesn't work under Windows XP?
Is there an old version of vasm to run on the Win32 platform?


I just poked around in a dusty corner of an old hard drive, and found this version of vasm which I compiled using mingw32 back in 2012. Maybe it'll be useful for someone...


You do not have the required permissions to view the files attached to this post.


Sat Oct 23, 2021 12:47 pm

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
To robinsonb5: Many thanks. I will try.
oldben wrote:
Is this demo style board for the 68000? That is a rather small amount of ram.
Have you seen? http://www.easy68k.com/paulrsm/dg/

I think 4kb RAM is sufficient for initial experiments. In the future, if there is a desire, I can always increase the amount of memory.
DTACK GROUNDED I skimmed through and .... did not see any schemes, only text.


Sat Oct 23, 2021 2:27 pm

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
To robinsonb5:
Yes, your vasm works on my Windows XP netbook.
I'm afraid to look intrusive, but...
I would also like to ask you about creating the simplest working environment. So far I've tried to put the lone vasmm68k_std.exe file and the source VUBUG.ASM in the root directory of the C: \ drive.
Next, I type on the command line
C: \ vasmm68k_std.exe VUBUG.ASM -L <Enter> and getting stop after five errors. No output files are created. Do vasmm68k_std.exe need any other files nearby for normal operation?
And still wondering where to find out about the m68k syntax, as it is understood by vasm?
I have a pdf taken from the author's site and dated June 2021. Is it too new?


Sun Oct 24, 2021 3:02 am

Joined: Wed Nov 20, 2019 12:56 pm
Posts: 76
Vladimir wrote:
I would also like to ask you about creating the simplest working environment. So far I've tried to put the lone vasmm68k_std.exe file and the source VUBUG.ASM in the root directory of the C: \ drive.
Next, I type on the command line
C: \ vasmm68k_std.exe VUBUG.ASM -L <Enter> and getting stop after five errors. No output files are created. Do vasmm68k_std.exe need any other files nearby for normal operation?


You shouldn't need anything else - but you might get on better with the _mot version than the _std version.
Try assembling a really simple test program - maybe:

Code:
   ORG 0

STACK_TOP   equ   $2000

Tag:
   dc.l   STACK_TOP
   dc.l   Start

Start:
   moveq   #1,d0
.loop
   move.l   d0,$dff180
   addq.w   #1,d0
   bra.s   .loop


Assemble with:
Code:
vasmm68k_mot -Fbin test.s

You should end up with a small binary file, a.out.

I had a quick look at the monitor file - it will need some adapting.
Symbols must be on the leftmost column, so there are a few lines of the form " symbol = value" which need moving to the left.
I'm not sure what the intention is where the code has "dc.l $userv1" but the $ needs to be removed.
(a1,d2:w) will need to be changed to (a2,d2.w)
.ascii will need to be replaced with dc.b
.asciz will need to be replaced with db.c *and* and terminating ,0 added to each line which uses it.
Where there are lines like "stack = .", just replace with "stack:"
Lastly, replace ctrls: and bkptf's definitions with single byte dc.b

Hope that helps.


Sun Oct 24, 2021 8:34 am

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
Now the work has gone well, I can study the syntax and so on...
Of course, there are still ambiguities, but now it doesn't matter yet..
Many thanks for the help!


Sun Oct 24, 2021 9:05 am

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
I was wrong about the free availability of the VUBug monitor for the VU68K SBC. What I took to be the software product I needed is, it seems, a monitor for another modified version of the SBC called RAYMATIC. I apologize for the misinformation.
I have not yet been able to find the original, unmodified version of the monitor program, suitable for the SBC VU68K, in electronic form. I found the source of this program so far only in paper form in the book by Andrew M. Veronis 'THE 68000 MICROPROCESSOR'. Now I am trying to type this source on a computer. If anyone has this program electronically and is willing to share it, please let me know.
Vladimir


Thu Oct 28, 2021 12:26 pm

Joined: Thu Oct 21, 2021 5:22 pm
Posts: 12
Here's another kind of syntax.
For example, there are lines like this:

Code:
MTAB:   DC.W   #1,#20A0
        DC.W   #1,#3D00


This is clear to me, the first parameter is the number of words, and the second is the word itself.
For vasm assembler, I can write instead
#1,#20A0 just $20A0.

But this is already unclear:

Code:
VECT2:   DC.L #1,$1018
VECT3:   DC.L #1,$101C
VECT4:   DC.L #1,$1020
VECTS:   DC.L #1,$1024
SSRI:    DC.W #1,#2000         ;Supervisor SR, interrupts
SSRN:    DC.W #1,#2700         ;Supervisor SR, no interrupts
PRMP:    DS "\r\n!\0"          ;Prompt (!)


What's the difference between $1018 and #2000?

P.S. Could it be that $ 1018 is not a number but a symbol? In this case, the dollar sign indicates that this is a symbol. Can a symbol contain only numbers?


Fri Oct 29, 2021 4:47 am

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1644
That is odd. Is it possible both $ and # are valid prefixes to denote hex?


Fri Oct 29, 2021 9:15 am
 [ 14 posts ] 

Who is online

Users browsing this forum: CCBot and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software