Go to advanced search

by Steve Drain
Sun May 12, 2019 2:27 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 413
Views: 17087

Re: Introduction to BBC BASIC

If you know the language inside-out like I do there are often big wins to be made by using 'novel' techniques, and in a library I don't mind if the code is unreadable so long as it works. FWIW I used a few tricks to truncate my arrays so that operations were not wasted on the leading zero parts. :)
by Steve Drain
Sun May 12, 2019 2:13 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 413
Views: 17087

Re: Introduction to BBC BASIC

I'm facing a dilemma: should I use a 10^n radix for the limbs (as the classic BASIC Fibo program does) or a more conventional 2^n radix? A long time ago, it seems, in the original topic, I had go at this using RISC OS BBC BASIC. I used 10^n radix and BASIC VI float arrays that could exploit the ARM...
by Steve Drain
Fri Jan 18, 2019 9:50 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

ejolson wrote:
Fri Jan 18, 2019 8:48 am
it would be nice if a RISC OS BBC BASIC code were to appear.
Just for fun I set an integer version of my code running. It finishd after 1117 minutes. :-)

That is extreme, because there are some optimisations still available.
by Steve Drain
Wed Jan 16, 2019 2:01 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

Since there is no inline assembler, does your code work with Richard's port of BBC Basic to Raspbian? I have no idea, but I think all the constructs are compatible, so maybe. I wonder how difficult it would be to add the Karatsuba algorithm. I did test my understanding of K using string representat...
by Steve Drain
Wed Jan 16, 2019 10:36 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

Along those lines, it would be nice if a RISC OS BBC BASIC code (with or without inline assembler) were to appear. Among such exalted and professional company, dicussing such esoteric matters, what could a dilettante such as myself hope to offer. :-) Well, here is a plain interpreted fibo program. ...
by Steve Drain
Fri Jan 11, 2019 9:35 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

Loading modules and talking to them through software interrupts is essentially how RISCOS implements shared libraries, so the missing BBC BASIC code is much like the Haskell code in that the programmer has reached the point of coding the doubling formula but the resulting big number computations ar...
by Steve Drain
Fri Jan 11, 2019 9:19 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

What the heck, I'd like to see it. There would be little point, and later comments make it clear that it is not really of much interest, because it is not using just the [a] BASIC language. It is essentially just a transliteration of the best doubling algorithm that has appeared here in various gui...
by Steve Drain
Thu Jan 10, 2019 9:19 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

That is interesting. I never knew RISC OS had such a big numbers module built in before you mentioned it. It does not. You soft-load the module and it become part of the OS. You can do this with a multitude of modules. RISC OS is very modular. :-) I'm puzzling how this fits with the agreed aims of ...
by Steve Drain
Thu Jan 10, 2019 7:16 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

jahboater wrote:
Thu Jan 10, 2019 7:11 pm
I thought BBC Basic was interpreted. If so that is very fast indeed!
I refer back to my earlier explanation of RISC OS modules as operating system extensions. The Numbers module has the calculation code and does all the hard lifting. My program is in BASIC, but not as you might imagine.
by Steve Drain
Thu Jan 10, 2019 7:01 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

It's hard work...all this avoiding BASIC business :) Back to BBC BASIC then. Following up on various bits discussed here I now calculate the fibonacci in about 2:15 minutes with RISC OS on an iMX processor at 1.2GHz. It is of the order of twice that on a Raspberry PI Zero, and the time to print a h...
by Steve Drain
Fri Jan 04, 2019 5:36 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

Would you mind posting what you have so far? I may do, but it only applies to BBC BASIC running on a RISC OS machine with the Numbers module loaded. To clarify for anyone unfamiliar with RISC OS, modules are operation system extensions. They can be written in assembler, C or just about in compiled ...
by Steve Drain
Fri Jan 04, 2019 1:22 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2312
Views: 100545

Re: Why Avoid BASIC on RPi?

While attempts to create a Fibonacci code using BBC BASIC by members posting in this thread have so far met with failure I have been lurking here from the start and I have learned a great deal, but I cannot let that go without some comment. ;-) I wrote a fairly naive doubling routine for RISC OS BB...
by Steve Drain
Sat Jun 10, 2017 6:27 pm
Forum: RISCOS
Topic: RISCOS I2C Access
Replies: 6
Views: 10629

Re: RISCOS I2C Access

I have an MCP23017 16 Port I/O extender board and an ADXL345 Acceleromter, both of which are I2C devices. Been a while, but I broke out BBC Basic, and started mucking about with SWI IIC_Control, and hey presto, I can now read/write both devices straight from Basic 5. You might want to look at SWI O...
by Steve Drain
Wed Oct 05, 2016 3:57 pm
Forum: Other programming languages
Topic: Porting ARM BASIC to the Raspberry Pi via SDL 2.0
Replies: 89
Views: 19687

Re: Porting ARM BASIC to the Raspberry Pi via SDL 2.0

Simple recursive factorial program, uses only 32-bit integer veriables Sorry David, that is a very poor example to give. Apart from the terrible performance of BBC BASIC used for recursion, the number of factorials that can be expressed as integers is very limited. Even if you use 5-byte float vari...
by Steve Drain
Wed Jun 15, 2016 7:44 pm
Forum: Other projects
Topic: Smarti Pi Touch
Replies: 19
Views: 6553

Re: Smarti Pi Touch

I got one too. I'm impressed. It took about 5 minutes total to install the Pi and really, carping about having to undo a whole 4 screws seems a bit much. Yes, there is a guide video on the website but I don't see much need for it for most people - the only details not obvious are the placing of the...
by Steve Drain
Tue Feb 09, 2016 6:43 pm
Forum: General discussion
Topic: The search for a lithium-ion charger/USB output board
Replies: 7
Views: 3668

Re: The search for a lithium-ion charger/USB output board

This item from RS might be just what you want, but that is the in UK. It does power through and 2.1A.

http://uk.rs-online.com/web/p/power-banks/7757508/

Perhaps there is something similar at Allied.
by Steve Drain
Tue Feb 02, 2016 4:37 pm
Forum: Other programming languages
Topic: ARM Assembly Optimization
Replies: 12
Views: 2615

Re: ARM Assembly Optimization

DavidS wrote:1: Minimize the use of branching.
You do not menton conditional execution. This used to be very valuable in reducing branching, but I have read that it is unlikely to be so on more modern processors with better prediction. I cannot get out of the habit, myself, though. ;-)
by Steve Drain
Sun Dec 13, 2015 4:08 pm
Forum: General discussion
Topic: I made a Raspberry PI Laptop
Replies: 840
Views: 377565

Re: I made a Raspberry PI Laptop

It would be nice if you would include links to your other PIP projects. I wanted to keep the post small. Thanks for posting the links anyway. :-) PIP4 needs a Pi2B version dang it! :lol: The killer is the HDMI setup for me. Very small wires The PIP3 might be adaptable to the Pi2B, but that is not f...
by Steve Drain
Sat Dec 12, 2015 5:16 pm
Forum: General discussion
Topic: I made a Raspberry PI Laptop
Replies: 840
Views: 377565

Re: I made a Raspberry PI Laptop

A year ago I posted about my Pip4 using the A+ with a Lapdock: http://kappa.me.uk/Raspberry_Pip/PIP4/General4.jpg I thought this would be the last word in minimilism - but then along came the Zero: http://kappa.me.uk/Raspberry_Pip/PIP0/general.jpg More details at: http://kappa.me.uk/raspberry_pip0.h...
by Steve Drain
Wed May 20, 2015 12:17 pm
Forum: General discussion
Topic: Removing ports from the Pi
Replies: 7
Views: 1370

Re: Removing ports from the Pi

I found removing ports from the original Pi, including the GPIO header, relatively easy and in one piece. I did all the things you have pointed out, plus diluting the solder with a lead-based one. However, the later Pi versions seem to use a higher melting point solder yet and I have not been able t...
by Steve Drain
Sat May 16, 2015 9:53 am
Forum: C/C++
Topic: Announcing FastARM: in assembly so you don't have to!
Replies: 14
Views: 1643

Re: Announcing FastARM: in assembly so you don't have to!

assembler wrote:In fact, any contribution would be welcome.
I am really out of my depth, but had you considered the Neon instructions on quad vectors? Eg:

Code: Select all

vadd.F32 q0, q0, q1
Just a thought. ;-)
by Steve Drain
Wed May 13, 2015 3:20 pm
Forum: HATs and other add-ons
Topic: Motorola Lapdock Atrix with the Pi
Replies: 16
Views: 3484

Re: Motorola Lapdock Atrix with the Pi

I have often thought of doing something similar, but with the larger Pi2 and a small HDD included. Using the A+ with the Lapdock has a couple of advantages as well as size. It can be back-powered through USB, which reduces the complication of cables, and it uses significantly less current, which is...
by Steve Drain
Wed May 13, 2015 10:25 am
Forum: HATs and other add-ons
Topic: Motorola Lapdock Atrix with the Pi
Replies: 16
Views: 3484

Re: Motorola Lapdock Atrix with the Pi

The two links in the OP are probably a poor guide now. First, the supply of of suitable connectors is much wider and probably cheaper than those earlier times. Second, the features of the current Pi change some of the assumptions. The summary from procount is excellent for the situation now, and I h...
by Steve Drain
Wed May 13, 2015 9:42 am
Forum: RISCOS
Topic: BBC Basic?
Replies: 3
Views: 1510

Re: BBC Basic?

Here are some suggestions. If you have a BASIC program written in StrongED's BASIC mode, you can run it by clicking Select (the left mouse button) on the 'Running man' icon at the top of the window. This will run the program in a single-tasking Command window in the centre of the screen[1], but this...
by Steve Drain
Tue Apr 07, 2015 4:36 pm
Forum: RISCOS
Topic: Filetypes
Replies: 3
Views: 1624

Re: Filetypes

I raised a similar problem on the ROOL forum a while back and I think there is no way to do it that way. You are seeing the Windows files in FatFS on the Pi without any of the translation that VRPC does. Here are two alternatives. The first is easiest, and that is to transfer the files using ShareFS...

Go to advanced search