| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
Announcements for updates...
Forum: JKB (32/64 bit Compiler)
Last Post: Albert Richheimer
Yesterday, 15:47
» Replies: 2
» Views: 27
|
Discussions
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
13.04.2026, 16:25
» Replies: 2
» Views: 67
|
Announcements for updates
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
13.04.2026, 15:16
» Replies: 0
» Views: 77
|
Sounds good!
Forum: JKB (32/64 bit Compiler)
Last Post: Dale Yarker
13.04.2026, 01:54
» Replies: 0
» Views: 39
|
What is different
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
12.04.2026, 13:43
» Replies: 0
» Views: 59
|
How to run own code
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
12.04.2026, 13:08
» Replies: 0
» Views: 47
|
Download and setup
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
12.04.2026, 12:51
» Replies: 0
» Views: 76
|
A new sub-forum for Juerg...
Forum: JKB (32/64 bit Compiler)
Last Post: Juergen Kuehlwein
12.04.2026, 12:26
» Replies: 1
» Views: 71
|
How many "1" bits /Is Num...
Forum: Source Code Library
Last Post: Dale Yarker
16.03.2026, 10:54
» Replies: 0
» Views: 158
|
Notepad++ hacked
Forum: This and that - friendly chat
Last Post: Stanley Durham
05.02.2026, 18:03
» Replies: 4
» Views: 864
|
|
|
| Faster leap year code. |
|
Posted by: Dale Yarker - 07.09.2024, 13:42 - Forum: Source Code Library
- Replies (1)
|
 |
This is roughly 3 times faster than the usual three MOD operations method.
Code: ! push eax 'for pseudo MOD, dividend and quotient
! mov FebDays, 28& 'not a leap year pre-set
! mov eax, 3???
! and eax, Year 'conditionally equivalent MOD 4
! jz MOD100 '0 is possible leap year
! jmp Done
MOD100:
! push ebx 'for divisor
! push edx 'for high part of dividend, remainder (MOD)
! xor edx, edx
! mov eax, Year
! mov ebx, 100???
! div ebx
! cmp edx, 0??? 'does MOD 100 = 0 ?
! pop edx
! pop ebx
! jz MOD400 '0 is possibly not a leap year
! jmp Is29Days 'non 0 is a leap year
MOD400:
! and eax, 3??? 'EAX has Year\100, so pseudo MOD 4 again
! jnz Done
! Is29Days:
! mov FebDays, 29&
Done:
! pop eax '
(here pseudo means conditionally equivalent, the condition is the divisor being a power of 2)
Longer description at: http://www.yarker-dsyc.info/Programs/Mis...yDays.html
|
|
|
| Discussing and posting |
|
Posted by: Tillmann Viefhaus - 09.06.2024, 12:33 - Forum: Suggestions and discussion about PUMP
- Replies (21)
|
 |
Hi, I hope its possible to post threads and post answers since it was closed down on powerbasic forum for all members from the EU. I just could reach Garys site with the intros and downloads. PowerBasic is too good to just leave it especially because it fullfils the requirements of todays stand alone software even as 32 bit compiler.
|
|
|
| Test posting |
|
Posted by: Albert Richheimer - 14.05.2024, 07:23 - Forum: Test forum
- Replies (11)
|
 |
this is a posting to test the BB codes.
Code: gThreadAlive=%TRUE
thread create ttdsPing(0) to gThread
SetThreadPriority gThread,%thread_priority_idle
gMainALoX = val(GetRegValue(%HKEY_CURRENT_USER,$REGISTRY,$MAINALOX))
gMainALoY = val(GetRegValue(%HKEY_CURRENT_USER,$REGISTRY,$MAINALOY))
gMutaALoX = val(GetRegValue(%HKEY_CURRENT_USER,$REGISTRY,$MUTAALOX))
gMutaALoY = val(GetRegValue(%HKEY_CURRENT_USER,$REGISTRY,$MUTAALOY))
' Connect to ttds
' ---------------
'
gDSConn=trm_Connect(gServerURL,gttdsPort,gttdsData,gttdsUser,gttdsPass,0)
if gDSConn < 0 then
gErrorText="Unable to connect user "+gttdsUser+" to database "+ _
gttdsData+":"+$cr+"Error "+format$(abs(gDSConn))+" - "+ _
trm_ErrorMessage(gDSConn)
msgbox gErrorText,%mb_iconerror or %mb_taskmodal,$ERR_CAPTION
exit function
end if
' Open ttds files
' ---------------
'
gDLDAT = trm_Open(gDSConn,gDLDAT_File,1)
if gDLDAT < 0 then
gErrorText="ERR#001 Cannot open "+gDLDAT_File+". Code "+format$(gDLDAT)
msgbox gErrorText,%mb_iconerror or %mb_taskmodal,$ERR_CAPTION
goto closedown
end if
dim abg(0) as global DLGES at varptr(dld)
Code tags obviously works fine - important for us programmers.
|
|
|
| How to register with PUMP / become a PUMP member |
|
Posted by: Albert Richheimer - 14.05.2024, 06:01 - Forum: Welcome to PUMP - PowerBASIC Users Meeting Point
- No Replies
|
 |
You are welcome to join PUMP (PowerBasic Users Meeting Point) by registering. PUMP is reserved for active (=contributing) users already registered at PowerBASIC. You are required to use your real name, in the exact spelling you are registered with PowerBASIC.com. After you have submitted the registration form I will check the name with the PowerBASIC forum and activate your account, if the above requirements are met. Otherwise the application for membership will be deleted without notification.
Please note that there is no formal right for getting access to PUMP.
Your admin: Albert
Update per 16-Nov-2025: As there are too many spam robots applying for an account I needed to switch off the Register Form. If you want to join PUMP and fulfill the above criteria you are welcome to send me an E-Mail. I need your full name and your location for creating an account for you.
PUMP is not affiliated with PowerBASIC Inc., PowerBASIC Tools LLC, or their successors.
|
|
|
|