Author Topic: FreeBASIC  (Read 3021 times)

0 Members and 1 Guest are viewing this topic.

John

  • Hero Member
  • *****
  • Posts: 3280
Re: FreeBASIC
« Reply #45 on: December 16, 2017, 11:52:24 AM »
Quote
he NSA have a facility in Utah, well suited to this enterprise

A great way to reduce the national debt. I know too funny and we all know where the bucks will end up.

Curious. The more BitCoin is mined, does it make it just that much harder to find the next coin? How did the early pioneers with a standard PC generate so many BitCoins?

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3751
    • Oxygen Basic
Re: FreeBASIC
« Reply #46 on: December 17, 2017, 02:57:22 AM »
Operations can be defined in inline assembler, so there is very little loss of efficiency.

Re BitCoins: I understand they are like prime numbers. The brute processing involved in finding new ones, increases exponentially. It's perfect for a pyramid scheme.

edcronos

  • Guest
Re: FreeBASIC
« Reply #47 on: December 17, 2017, 03:35:16 AM »
for me it's complicated, I researched and read about it,
but for the variety of answers it seems to be tricky even for seasoned programmers
in Vba I used 4 32-bit integers for the process, but ended up not fitting at all what I wanted to do, besides complicating the whole process
basically I use only Or, And, Xor, Not, and bitcount,
« Last Edit: December 17, 2017, 03:57:31 AM by edcronos »

John

  • Hero Member
  • *****
  • Posts: 3280
Re: FreeBASIC
« Reply #48 on: December 17, 2017, 04:24:23 PM »
Quote
It's perfect for a pyramid scheme.

Can you imagine the US government not being able to print money on demand?  :D

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3751
    • Oxygen Basic
Re: FreeBASIC
« Reply #49 on: December 20, 2017, 09:04:39 AM »
basically I use only Or, And, Xor, Not, and bitcount,

logic, addition and subtraction is very easy to implement in any binary width. Multiplication and division are the trick operations. I'm still fine-tuning the operator system, but this illustrates what a 128-bit logic operator set would look like, without Assembly code:

Code: [Select]
type i128 int i1,i2,i3,i4

macro i128_op(a,  p)
  macro .ops(p,a)
    ac.i1 p a.i1
    ac.i2 p a.i2
    ac.i3 p a.i3
    ac.i4 p a.i4
  end macro
  macro ."save"(a)
    i128 ac
    a.i1=ac.i1
    a.i2=ac.i2
    a.i3=ac.i3
    a.i4=ac.i4
  end macro
  macro ."load"(a)
    dim i128 ac
    i128_op.ops(=,a)
  end macro
  macro ."and"(a)
    i128_op.ops(and=,a)
  end macro
  macro ."or"(a)
    i128_op.ops(or=,a)
  end macro   
  macro ."xor"(a)
    i128_op.ops(xor=,a)
  end macro   
  macro ."not"(a)
    i128_op.ops(=not,a)
  end macro   
end macro

'TEST
dim u,v,w,x as i128
u=v and (w or x)
« Last Edit: December 20, 2017, 09:46:00 AM by Charles Pegge »

edcronos

  • Guest
Re: FreeBASIC
« Reply #50 on: December 20, 2017, 11:52:13 AM »
thank you
I've been a bit busy, but still searched for asm, I was already working on some things to use 32bit and 64bit, I noticed it's quite complicated to implement 128bit
I do not know if it's possible something like that.
__int64a;
__int64 b;
__int64 c;
int Count;
asm {
  mov rax, a
  mov rbx b
   and rax, rbx
   mov c rax
     popcnt Count, rax
}

I am waiting for the new version of the Oxygen to try to migrate my functions, some not even use but can serve something like the ones that generate the csn "Combinational Sequence Number" by the combination and that generates the combination by csn

there are people who learn to program specifically because of lotteries, in the forum there is one that has learned Delphi even made a program for personal use, and now he is learning Python to be able to take advantage of the available resources, but unlike me he makes bets,