LB Booster
« Sad :( »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:43am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Sad :(  (Read 1049 times)
Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Sad :(
« Thread started on: Sep 3rd, 2015, 6:54pm »

The rift that has developed between you Richard and some of the LB community is very sad cry

The coding community needs to be better than this. We also need to be more tolerant of each other. Some autistic individuals find peace in coding. Are they to be banned from forums because they can't phrase things in "delicate" ways?

Maybe I should ditch LB and start looking at BBC Basic instead?

I REALLY appreciate LBB and all the help you have given me Richard.

You are a star smiley
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Sad :(
« Reply #1 on: Sep 3rd, 2015, 8:05pm »

on Sep 3rd, 2015, 6:54pm, Monkfish wrote:
Maybe I should ditch LB and start looking at BBC Basic instead?

Don't do that! The languages are not really comparable - Liberty BASIC is a 'higher level' language that makes it far easier to create a GUI-based application than BBC BASIC does.

LBB gives you the best of both worlds - compatibility with LB but at the same time the power of BBC BASIC in the background if you need it.

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Sad :(
« Reply #2 on: Sep 3rd, 2015, 9:04pm »

Okay. I will check out BBC Basic so I can get the best from both.

In the old days I used to use Basic plus Assembly code for routines I needed to go really fast. Is that still possible? I need to check that out too.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Sad :(
« Reply #3 on: Sep 4th, 2015, 12:53pm »

on Sep 3rd, 2015, 9:04pm, Monkfish wrote:
In the old days I used to use Basic plus Assembly code for routines I needed to go really fast. Is that still possible?

It's possible, with care, but I wouldn't say it's easy! Here's a program which uses some embedded assembler code; it can output over a million digits of PI (you would need to adapt it to write the output to a file to see that much):

Code:
    ' Program to output digits of PI

    input "Enter number of digits required (multiple of 4): "; ndigits
    m = int(ndigits / 4) * 14 or 0

    !DIM P% 100, B%(m) : B%() = 20 : [OPT 2
    !.pidig mov ebx,^B%(0) : mov ecx,[^c] : xor edx,edx : lea ebp,[ecx*2-1]
    !.pi1   imul edx,ecx : mov eax,[ebx+ecx*4] : imul eax,100 : add eax,edx
    !cdq : div ebp : mov [ebx+ecx*4],edx : mov edx,eax : sub ebp,2 : loop pi1
    !mov eax,edx : ret :]

    e = 0
    l = 2
    for c = m to 14 step -7
      !d = USR(pidig)
      select case
        case d = 99: e = e * 100 + d : l += 2
        case c = m: print int(d / 100) / 10; : e = d mod 100
        case else:
          print right$("00000000000";(e + int(d / 100)), l);
          e = d MOD 100 : l = 2
      end select
    next
    end 

Richard.
« Last Edit: Sep 4th, 2015, 12:53pm by Richard Russell » User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Sad :(
« Reply #4 on: Sep 4th, 2015, 1:34pm »

Thank you smiley
« Last Edit: Sep 4th, 2015, 1:35pm by Monkfish » User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Sad :(
« Reply #5 on: Sep 4th, 2015, 7:17pm »

If I want to use assembly in my LBB programs it looks like I will need to understand BBC Basic. Should I buy a copy of BBC Basic? I'm quite happy to do so, especially if you get the money wink
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Sad :(
« Reply #6 on: Sep 4th, 2015, 8:20pm »

on Sep 4th, 2015, 7:17pm, Monkfish wrote:
If I want to use assembly in my LBB programs it looks like I will need to understand BBC Basic. Should I buy a copy of BBC Basic?

I don't recommend it (and I certainly don't need the money). Download the free trial version if you want to, but really all you should need is the assembler documentation which is available online here.

Are you already reasonably familiar with IA-32 (x86) assembly language? If you are, the BBC BASIC assembler won't hold any surprises - the syntax it uses is very similar to others (more so to NASM than to MASM). If you aren't, then learning to code in assembly language will be far more important than knowing anything about BBC BASIC!

The power of having the assembler itself available at run-time, as it is in BBC BASIC (and LBB), is often not appreciated because it's so unusual. For example it allows you to code values known only at run time as 'constants' rather than 'variables', and thereby achieve a performance boost not normally available. It also allows code to be relocated to an address known only at run time, without the complication of a linker.

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Sad :(
« Reply #7 on: Sep 4th, 2015, 9:25pm »

Looks like I've got some study ahead. I only programmed assembly on 6502... Lol

I never want to do anything too demanding. Normally just fast data manipulations.... bit wise stuff.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Sad :(
« Reply #8 on: Sep 5th, 2015, 3:08pm »

on Sep 4th, 2015, 9:25pm, Monkfish wrote:
Looks like I've got some study ahead. I only programmed assembly on 6502... Lol.

That's not such a terrible background. The 8080/Z80 (which were my introduction to assembly language programming) would probably have been better, but at least the 6502 is little-endian and has a conventional stack.

You may be amused to learn that BBC BASIC for Windows still contains a residue of its 6502 ancestry. To read the 'dot pattern' of a character (assumed to be an 8 x 8 matrix, which it was on the BBC Microcomputer) you allocate an 8-byte block of memory and call an 'OS' routine. The character code is passed in the A% variable, the least-significant byte of the memory address in the X% variable and the most-significant byte of the memory address in the Y% variable; these correspond directly to the A, X and Y registers of the 6502! cool

Richard.
User IP Logged

Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Sad :(
« Reply #9 on: Sep 5th, 2015, 5:58pm »

Nice to know that despite the intervening years some links to the past still remain. The modern I.T. world must be riddled with artefacts like that. smiley
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls