Help with writing a 64-bit ARM assembler

bbc micro/electron/atom/risc os coding queries and routines
Post Reply
User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Help with writing a 64-bit ARM assembler

Post by pixelblip » Tue Sep 15, 2020 5:36 pm

Hi there
I was thinking on the way to work today...wouldn't it be great to be able to program a BBC Basic app and have it published on Google Play ....imagine the possibilities. It means mere mortals could create an app and who knows maybe even flog it!

I don't know about you but I tried java once and thought urrgh I've got no chance of that.
Yet I was able to program - what was a very basic program it has to be said - in BBC basic earlier on in the year ( do you remember my gallery thing? ). I created an .apk and thought wow I've actually done that. I have no experience and am no programmer!

I am not saying someone would buy that gallery app but it does excite me that this could be a possibility. I would also love to encourage younger people to use BBC basic and if they could do that I am sure they would be very enthusiastic ( although they probably know java and python better that I ever would!). Someone out there to create the next Snapchat in BBC Basic ( well maybe not ! ).

What we need is someone who can help Richard write a 64-bit ARM assembler. That is no meant feat. I believe this is what he needs help with to be able to achieve this. Is there anyone out there with this knowledge on stardot? It's tricky stuff indeed. BBC Basic for other platforms has an assembler built in so I guess this is what Richard is talking about.

I suppose if you can do this then you will probably be making millions at Google or Microsoft but I will ask on his behalf again and if anyone has those valuable skills then do let us know. It would be so special to see apps people could sell written with BBC basic.

IOS of course is a different matter and we probably would never see that but I shall put it to Apple regardless! They should encourage this. Then again if they won't let Fornite off they are hardly going to take notice of me are they!

Just the thought of this gets my head spinning.....it would be very cool and very with the times. Any thoughts from those in the know....do chip in!
Thanks

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by pixelblip » Wed Sep 16, 2020 7:10 pm

We are going to have to cast our net a bit wider Richard.....

User avatar
jgharston
Posts: 4120
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by jgharston » Thu Sep 17, 2020 8:23 pm

pixelblip wrote:
Tue Sep 15, 2020 5:36 pm
What we need is someone who can help Richard write a 64-bit ARM assembler. That is no meant feat. I believe this is what he needs help with to be able to achieve this. Is there anyone out there with this knowledge on stardot? It's tricky stuff indeed. BBC Basic for other platforms has an assembler built in so I guess this is what Richard is talking about.
I've written a PDP11 assembler in BBC BASIC, and long ago I refactored it into a core and a CPU-specific part, as with my disassembly modeules, so it was able to branch into a 6502 assembler and a 6809 assembler. They didn't progress very far as they were a technical exercise as I use the pre-existing 6502 and 6809 assemblers for ARM BASIC and Windows.

So, an ARM module could be written for the assembler core.

However, is the question about writing an in-line assembler for BASIC? I keep starting doing that for PDP11 BASIC, but as I routinely use my actual assembler I've not got aroudn to getting very far with it. If I wasn't running around trying to earn a living, I'd give it a go. (I can't beleive this is the first time I've come on here in something like a fortnight)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by pixelblip » Thu Sep 17, 2020 8:37 pm

Thanks a lot for your reply

I probably didn't get the gist of it when talking to Richard......
He has posted again here about this so maybe it is better to discuss it with him in that post.

viewtopic.php?f=30&t=20539

It would be so good to find someone with this knowledge to help him. I'd love to see apps made for the play store written in good old fashioned bbc basic.

User avatar
Richard Russell
Posts: 1668
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by Richard Russell » Sat Sep 19, 2020 4:01 pm

pixelblip wrote:
Thu Sep 17, 2020 8:37 pm
It would be so good to find someone with this knowledge to help him.
There's been no response at all to my question in the other thread, which is disappointing. I think the main interest here is in the 32-bit ARM rather than 64-bit (it is after all primarily a 'retro' forum) but I don't know where else to turn. Writing an assembler isn't necessarily difficult if you're familiar with the instruction set, but without that background, and at least a feel for how the assembly language is structured, it's not practical.

Do you think a cash incentive would help? I don't mind paying if that's the only way.

User avatar
BigEd
Posts: 3429
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by BigEd » Sat Sep 19, 2020 5:52 pm

If I were asking, I think I'd just bump the thread after a few months, see if someone becomes interested, or someone might have improved their skills, or missed it previously. It might be worth offering a bounty, but I wouldn't expect that to be decisive. Perhaps if you have something unique like a signed mouse mat, that would be tempting! Maybe Bryan/helpful can bring your request to the attention of the ROUGOL crowd (perhaps PM him?)

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by pixelblip » Sat Sep 19, 2020 6:59 pm

Good idea big Ed.
I'd be happy to contribute something personal to the person ...maybe a special pic or mug ...a one off for them.

I wouldn't think the lack of replies is down to enthusiasm ...especially on stardot...I reckon it's more skills.

Everyone please put your feelers out....BBC Basic has come along way in 2020....the Raspberry pi is the spiritual successor to the Beeb...it deserves a great BBC Basic version doesn't it....

alex_farlie
Posts: 163
Joined: Sun Jul 07, 2013 10:46 pm
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by alex_farlie » Wed Oct 07, 2020 5:56 pm

Pixelblip...

From doing some reading of a document here - https://www.element14.com/community/ser ... Manual.pdf which goes into the main differences between Arm64 and ARM32, there are some key differences between AArch32 and AArch64.

On ARM26/32 certain branch calculations encode an offset, the calculation for this may be different on AArch64. ( See Section 3.2 of the linked PDF)

Instructions may have different binary encodings for the same mnemonic depending on a 32bit form or 64 bit register being accessed, in terms of the BBC BASIC style assembler MOV R0, a% and MOV R0, a%% would have different binary encodings. (Section 4.2)
( The linked document use Wn for 32 bit registers and Xn for 64 bit registers. Rn is the notation I recall being used under RISC OS)

Certain "conditional-execution" indications are given using .cond instead of the condition code forming part of the instruction mnemonic. (Section 4.3)

The general length of AArch64 instructions still seems to be 32 bits though.

I found an unofficial list of the binary encodings for AArch64 here - https://kitoslab-eng.blogspot.com/2012/ ... oding.html

I hope this helps anyone considering adding an AArch64 bit assembler to BBC BASIC for SDL, which looks like it could be "adapted" from the existing Arm32 assembler.

alex_farlie
Posts: 163
Joined: Sun Jul 07, 2013 10:46 pm
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by alex_farlie » Wed Oct 07, 2020 8:32 pm

I found a more recent Technical Manual - https://developer.arm.com/documentation ... 02d07b2799

If you've ever read the assembler sections of the PRM or DDE, portions of the above will make sense, I am having a hard time though...

User avatar
pixelblip
Posts: 2212
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Help with writing a 64-bit ARM assembler

Post by pixelblip » Tue Oct 13, 2020 9:18 pm

Thank you Alex.
We are going to have to find some whizz kids for this stuff. It's evident in the lack of replies on this subject. I take your word for it if you find it hard as well 😉

We will keep this flame burning. There must be someone out there up to this. The trouble is it won't make anyone rich.

I'd love so much to see BBC Basic apps in the play store it would give hope to those who think they can't program. Bbc Basic is a great and easy language to get things done. Unlike so many today that seem too hard.

Post Reply

Return to “programming”