Author Topic: github not letting me do a request to push additions to QB64  (Read 2597 times)

0 Members and 1 Guest are viewing this topic.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
github not letting me do a request to push additions to QB64
« on: August 27, 2019, 03:11:57 pm »
Github is simply not playing nice, Complaining my Firefox is too old to use anymore. And somethings just are not working any more. Everything I have is old, not just Firefox, the computer itself is old(well all of them are really), Vista is old.

But I have some Bit commands I wanted to push,
_SETBIT, _READBIT, _RESETBIT, and _TOGGLEBIT

and was wondering if anyone(Steve, Fellippe, Luke, ect) could push them through for me. I would be very grateful.

I'm hoping to start upgrading my hardware and everything early next year, So when I finish _ROTATEBITS and _FLIPBITS I can try to push them myself.

 I've started using these command, in some working projects that I will eventually like to share, so need to see about getting them in there.

Code: [Select]
SUBS_FUNCTIONS.BAS:
clearid
id.n = "_READBIT"
id.subfunc = 1
id.callname = "_READBIT"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid

clearid
id.n = "_SETBIT"
id.subfunc = 1
id.callname = "_SETBIT"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid

clearid
id.n = "_RESETBIT"
id.subfunc = 1
id.callname = "_RESETBIT"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid

clearid
id.n = "_TOGGLEBIT"
id.subfunc = 1
id.callname = "_TOGGLEBIT"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid
---------------------------------------------------------------------------------------------

QBX.CPP:
extern int64 _READBIT(int64 a1, int b1);
extern int64 _SETBIT(int64 a1, int b1);
extern int64 _RESETBIT(int64 a1, int b1);
extern int64 _TOGGLEBIT(int64 a1, int b1);
-------------------------------------------------------------------------------------------

LIBQB.CPP:
int64 _READBIT(int64 a1, int b1)
{if (a1 & 1<<b1) return -1; else return 0;}

int64 _SETBIT(int64 a1, int b1)
{return a1 | 1<<b1;}

int64 _RESETBIT(int64 a1, int b1)
{return a1 & ~(1<<b1);}

int64 _TOGGLEBIT(int64 a1, int b1)
{return a1 ^ 1<<b1;}


I'll work on some sample programs, and the wiki information. The template Fellippe supplied me with for _SHR\_SHL is around somewhere.
Granted after becoming radioactive I only have a half-life!