From 761c34a7f6de00af5360178bcbd745c80652d910 Mon Sep 17 00:00:00 2001 From: Kobolticus <41238011+Kobolticus@users.noreply.github.com> Date: Mon, 29 Oct 2018 22:53:36 -0400 Subject: [PATCH 1/3] Added support for _SHR\_SHL functions --- source/subs_functions/subs_functions.bas | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 8cccbb20f..5f7823990 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -3343,3 +3343,21 @@ id.callname = "func__autodisplay" id.args = 0 id.ret = LONGTYPE - ISPOINTER regid + +clearid +id.n = "_SHR" +id.subfunc = 1 +id.callname = "_SHR" +id.args = 2 +id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) +id.ret = INTEGER64TYPE - ISPOINTER +regid + +clearid +id.n = "_SHL" +id.subfunc = 1 +id.callname = "_SHL" +id.args = 2 +id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) +id.ret = INTEGER64TYPE - ISPOINTER +regid From 8202f98e10838d98890241a50888d1e69612318e Mon Sep 17 00:00:00 2001 From: Kobolticus <41238011+Kobolticus@users.noreply.github.com> Date: Mon, 29 Oct 2018 22:56:06 -0400 Subject: [PATCH 2/3] Added _SHR\_SHL declarations --- internal/c/qbx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index 610fd6011..bbd245310 100644 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -617,6 +617,9 @@ extern uint64 string2ui64(qbs*str); extern float string2s(qbs*str); extern double string2d(qbs*str); extern long double string2f(qbs*str); +//Cobalt(aka Dave) added the next 2 lines +extern int64 _SHR(int64 a1, int b1); +extern int64 _SHL(int64 a1, int b1); #ifndef QB64_WINDOWS extern void Sleep(uint32 milliseconds); extern void ZeroMemory(void *ptr,int64 bytes); From f3eba1aee297504a8c3e7a4500fa184780538265 Mon Sep 17 00:00:00 2001 From: Kobolticus <41238011+Kobolticus@users.noreply.github.com> Date: Mon, 29 Oct 2018 23:01:04 -0400 Subject: [PATCH 3/3] Added Functions for _SHR\_SHL --- internal/c/libqb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index f17b95401..592b9f482 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -29741,3 +29741,9 @@ void reinit_glut_callbacks(){ #endif } + +int64 _SHL(int64 a1,int b1) +{return a1<>b1;}