Sunday, 3 July 2011

BASIC Assembler with VFP/SIMD (finally)

The VFP and SIMD extensions to the BBC BASIC assembler are working!  All of the instructions assemble from the test script.  Significantly more testing is required before a first release but I hope to publish something to the TBA downloads area in the not too distant future.

There are a few alterations to the official ARM syntax in order to accommodate the legacy BBC BASIC tokens and language syntax

1) In order to use an expression for a register number you have to specify the type followed by # and then an expression - for example Q#FNregister specifies a Quadword type register with a number returned from FNregister.

2) VDUP is currently renamed to VDPL as VDU is a keyword and VDUP.16 will get tokenized as VDUPRINT16 due to existing tokens.

3) Full encoding of floating point or 64bit immediate constants isn't supported, so there is a workaround where you can specify the immediate byte with a I64. F64. or F32. prefix.  This assumes you have encoded the value in a suitable way yourself which is better than nothing.  It must be said these immediate values are not exactly useful anyway.

4) The optional AL condition isn't supported on the unconditional SIMD instructions, and additional register type specifiers following the data-type are also not supported.

There are probably a few more options in the ARM syntax that are not supported - I'll have a go at reading through it all again to create some releases notes.

The to-do list

Error handling is still not integrated fully although this will be looked at next.  The current error numbers need evaluation to see how to include some additional VFP related messages.  I also expect there to be bugs (or undefined results) relating to use of incorrect syntax, and bugs relating to validation as it isn't possible to test every single invalid combination.  The current known bug list includes small things like optional brackets with a single register in a list, and specifying D0-D3 instead of D0,D1,D2,D3 on the VLDx/VSTx instructions.   Nothing major.

The final task is updating the help messages and creating some documentation so that the new instructions appear on the various help commands such as HELP [.   I'm also looking at adding a new command to display the VFP/SIMD assembler version and some debugging data to help with bug reporting.    The documentation will describe how the assembler and pattern tables work, along with how the BASIC version works that generates the optimized pattern tables for the assembler version.

It is quite easy to add additional non VFP/SIMD instructions to the pattern tables although I haven't started to look at what is currently missing.


  1. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place. This brand is known for the service it gives but in case it bumps you in some issue what will you do? You should get in touch with experts of Norton Phone Number UK . Call at Norton Support Number UK and the experts here are ready to solve all your issue in Norton.

  2. Very Very nice post. its a very useful and outstanding article. Thanks for that.
    We are offering a new and latest Epson Printer Technical Support.Call @0800-090-3224 for Epson Support, Epson Printer Help, Epson Support Number, Epson Technical Support, Epson Customer Service, Epson Helpline.
    Epson Technical Support

  3. It‘s actually a nice and useful piece of information. Contact our technical experts at HP Contact Number UK +44-800-098-8371 and get your issue solved in minutes with easiest way ever.

  4. Hii, Thanks for the sharing nice posting with us. i’m really impressed.

    Acer Contact Number
    Acer driver update

  5. very very nice post. thanks for the sharing with us.

    Lenovo Support UK

  6. This is outstanding and great post! i really like it.thank you so much.
    Call@ Canon Support 0800-098-8590 for Canon Tech Support, Canon Printer Help, Canon Help line, Canon Help, Canon Service, Canon Repair Center, Canon Support Number.

  7. Lexmark Printer Support / 0800-014-8577 / UK Lexmark Customer Service.
    Call 0800-014-8577 for Lexmark printer support phone number, lexmark printer tech support number, lexmark printer customer service phone number, lexmark printer customer support phone number, lexmark technical support phone number.

  8. Take a look at my page
    Call 0800-090-3224 for Samsung Support in the UK, Our well expert technicians are here to help for our valuable samsung customer, Samsung Printer customer Support, Samsung customer care, Samsumg Help desk Number.
    Samsung printer help
    Samsung Support
    Samsung printer Support

  9. This comment has been removed by the author.

  10. This comment has been removed by the author.

  11. Thanks for sharing such kind of post! I have gone through with your article, the data are given in a very good manner.mcafee antivirus support number

  12. Very nice post , really informative guys, Helped me to know about all these things in a single post. Good Work.Toshiba Laptop Customer Service

  13. I like the valuable information you supply in your articles.I am finding there some interested blogs.Hp Laptop Support Number

  14. Thanks for giving important information to training seekers,Keep posting useful information.Lenovo Laptop Customer Service

  15. I like the above shared article very much as it shares good information for us. Waiting for something new like this from your side.

    Asus router customer service

  16. for an upcoming time, you can use our mail reservation type where you can specify a substitute woman should your perfect option not be availablegta 5 apk