Search found 163 matches
- Wed Jun 28, 2023 12:14 am
- Forum: Assembly and C Programming in PureBasic
- Topic: SHA256 with CPU-SHA-Instruction-Set
- Replies: 10
- Views: 6053
Re: SHA256 with CPU-SHA-Instruction-Set
Ok, but only because I'm the starting author. No questions to C-Backend! ;- https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sha-extensions.html ;- PureBasic 6.02 LTS (x64), ASM-Backend ;- Source for this Test: Unicode String ;- SH1 is unsave (broken)! ;Check for CPU-SHA-In...
- Thu Feb 25, 2021 3:37 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: bitmap color fill
- Replies: 15
- Views: 9792
Re: bitmap color fill
@chi: Procedure BitmapFillColor(Width.l, Height.l, ARGB.l=$FF000000) Protected img.l, bmi.BITMAPINFO bmi\bmiHeader\biSize = SizeOf(BITMAPINFOHEADER) bmi\bmiHeader\biWidth = Width bmi\bmiHeader\biHeight = -Height bmi\bmiHeader\biPlanes = 1 bmi\bmiHeader\biBitCount = 32 img = CreateDIBSection_(0, @bmi...
- Thu Feb 25, 2021 12:26 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: bitmap color fill
- Replies: 15
- Views: 9792
Re: bitmap color fill
For instructions like STOSD it´s a good idea set/clear explicit the Direction Flag before. In this case
Code: Select all
...
!cld ;increment the index register
!stosd
- Sun Feb 21, 2021 2:09 pm
- Forum: General Discussion
- Topic: AES query...
- Replies: 18
- Views: 3885
Re: AES query...
Padding in PB are not fix values. The last Block is internal expanded with the last Bytes of the Block before. This is a simple example: ;No Unicode!!! String$ = "Hello this is a test for AES" Debug String$ Debug "Len: " + Len(String$) ;28, we need 32 *CipheredString = AllocateMe...
- Sat Jan 02, 2021 2:53 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: Integer Multiplication with FFT (e.g. Mersenne)
- Replies: 4
- Views: 7131
Integer Multiplication with FFT (e.g. Mersenne)
I´m a fan of Mersenne-Primes and other big numbers and the calculation of this. My code for this with use of FFT: ;- Fast Unsigned FFT-Integer-Multiplication ;- see https://en.wikipedia.org/wiki/Butterfly_diagram (radix-2 decimation-in-time FFT algorithm) ;- FFT-Multplication in PureBasic see https:...
- Sun May 03, 2020 5:58 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: FPU how to cleanup register?
- Replies: 10
- Views: 12143
Re: FPU how to cleanup register?
Corona: No pubs, no bars... Much time for program -> corrected version (physical register): Procedure FPU(FPU_ID) Protected.q SaveRam, SaveRamAli, C1, PhysReg, RFlags, CW, SW, Tags Protected.d FST0, FST1, FST2, FST3, FST4, FST5, FST6, FST7 Protected.s sN = "Clear", sY = "Set", sS...
- Thu Apr 23, 2020 6:28 am
- Forum: Coding Questions
- Topic: Same Calculation, different results
- Replies: 10
- Views: 2492
Re: Same Calculation, different results
PureBasic don´t use FPU-instructions, it uses the msvcrt.dll (routines without FPU).
- Sat Feb 15, 2020 8:23 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: FPU how to cleanup register?
- Replies: 10
- Views: 12143
Re: FPU how to cleanup register?
With this you can check the FPU-Registers: Procedure FPU() Global.q SaveRam, SaveRamAli, Ali Global.d FST0, FST1, FST2, FST3, FST4, FST5, FST6, FST7 Global Tag.b Protected Tag0$=" Free", Tag1$=" Free", Tag2$=" Free", Tag3$=" Free", Tag4$=" Free", Tag...
- Mon Oct 07, 2019 6:58 pm
- Forum: Coding Questions
- Topic: Chess Engine
- Replies: 16
- Views: 3860
Re: Chess Engine
Code part2: Procedure wc(hWnd, uMsg, wParam, lParam) ;WindowCallback, nur für Stellungseingabe! Select uMsg Case #WM_LBUTTONUP MX = WindowMouseX(0) MY = WindowMouseY(0) If MX > 20 And MX < 340 ;Vergleiche ohne "=" ! MX - 20 MX / 40 Maus_Linie = MX + 97 ;97="a" If MY > ORand And M...
- Mon Oct 07, 2019 6:56 pm
- Forum: Coding Questions
- Topic: Chess Engine
- Replies: 16
- Views: 3860
Re: Chess Engine
For tests (analysis) and fun I wrote this (is under construction!) for the asmFishW-engines: Code part1: ;Helles asmFishW-Player, 7.Oct.2019 ;For asmFishW! ;PB 5.70 LTS (x64) ;UNICODE! ;UNDER CONSTRUCTION! ;No move-check!!! ;No table-bases ;No ponderhit ;No ... ;German ;Download asmFishW-Engines: ;h...
- Sun Jan 20, 2019 10:33 pm
- Forum: Coding Questions
- Topic: Absolute Val for Integers?
- Replies: 62
- Views: 8409
Re: Absolute Val for Integers?
You can use for Windows x64 the msvcrt.dll (PB use this DLL for many purposes): ;Windows x64 If OpenLibrary(0, "msvcrt.dll") Prototype.q Abs64(V1.q) Prototype.l Abs32(V2.l) Abs64.Abs64 = GetFunction(0, "_abs64") Abs32.Abs32 = GetFunction(0, "labs") CloseLibrary(0) Else ...
- Sat Oct 13, 2018 2:54 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: Function DMS
- Replies: 2
- Views: 7783
Re: Function DMS
For fun with FPU, SSE and SSE2; PB 64-bit: ;PB 5.61 (x64) Procedure.s DMS_FPU(DD.d) !fstcw word[CW_FPU] !mov ax,[CW_FPU] !or [CW_FPU],0000110000000000b ;no rounding, truncation !fldcw word[CW_FPU] !fld qword[p.v_DD] ;no check of range! !fist word[DMS_FPU] !fisub word[DMS_FPU] !fmul qword[V60_FPU] !f...
- Wed Apr 25, 2018 3:03 pm
- Forum: Applications - Feedback and Discussion
- Topic: VenMon - PC Monitoring Software
- Replies: 44
- Views: 17222
Re: VenMon - PC Monitoring Software
The PDH.dll is language-sensitive! For the german-version replace in the procedure
with
Code: Select all
Temp.s + "% Processor Time"
Code: Select all
Temp.s + "Prozessorzeit (%)"
- Tue Dec 19, 2017 6:22 pm
- Forum: Coding Questions
- Topic: D2XX by FTDI with Purebasic 5.60+
- Replies: 13
- Views: 2936
Re: D2XX by FTDI with Purebasic 5.60+
What´s your hardware? I have for fun a FTDI UM232H and a LED-strip WS2801. This is code for tests and a "running light", 64-bit-version (no problem to convert in 32, comments in german): OutputBuffer.q OutputBuffer1.q ;für "schwarz" InputBuffer.q ftHandle.l NumBytesToSend.l NumBy...
- Wed Dec 06, 2017 11:07 am
- Forum: Assembly and C Programming in PureBasic
- Topic: SHA256 with CPU-SHA-Instruction-Set
- Replies: 10
- Views: 6053
Re: SHA256 with CPU-SHA-Instruction-Set
Sorry, but if I install a new PB-version, first action is copy the latest FAsm-version into the PB Compilers-Directory.
SHA-support is new in FAsm-version 1.71.40 (Oct 19, 2015)! 2 years !
SHA-support is new in FAsm-version 1.71.40 (Oct 19, 2015)! 2 years !