BBC BASIC for Windows
« 256 Thread fast ping sweep »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:29pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: 256 Thread fast ping sweep  (Read 1531 times)
sveinioslo
Developer

member is offline

Avatar




PM


Posts: 64
xx Re: 256 Thread fast ping sweep
« Reply #2 on: Mar 27th, 2015, 5:37pm »

That is because 'push 32' gives op-code '6A 20' which is 'push imm8' in my manual.
I have not read anywhere if that means only one byte is pushed or if it is padded to dword.
Msdn specifies dword (actually they say word but that doesn't work), so better safe than sorry.

Svein
User IP Logged

rtr2
Guest
xx Re: 256 Thread fast ping sweep
« Reply #3 on: Mar 27th, 2015, 6:46pm »

on Mar 27th, 2015, 5:37pm, sveinioslo wrote:
better safe than sorry.

You perhaps forget how much experience I have had of writing x86 assembler code - the entire BBC BASIC for Windows interpreter is implemented that way! I would not have recommended that you use push 32 if there was a risk associated with it; there isn't. The imm8 referred to is the size of the operand (32 fits into a signed 8-bit number); it doesn't relate to the number of bytes pushed onto the stack, which is always 4 (or a multiple thereof).

As I said, using push 32 will make your code shorter and easier to read. If you think there is some sort of risk associated with doing that you should stop using BB4W immediately because there are probably hundreds of such instructions in the code of the interpreter! grin

Richard.
« Last Edit: Mar 27th, 2015, 7:30pm by rtr2 » User IP Logged

sveinioslo
Developer

member is offline

Avatar




PM


Posts: 64
xx Re: 256 Thread fast ping sweep
« Reply #4 on: Mar 30th, 2015, 08:00am »

Hehe, i used to use 'push imm' but changed it to the 'push reg' because i wasn't sure how many bytes was pushed.
This program wasn't easy to get working, my first multithreaded project, it required a lot of research.
I am making a note on the mov/push instructions, thank you.

Svein
User IP Logged

Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx Re: 256 Thread fast ping sweep
« Reply #5 on: May 28th, 2016, 1:26pm »

Svein,

I notice that you use the phrase, "multi-threading", which has caught my eye.
I am currently playing around with 3D graphics using asm and wondered if I could get it to go faster by multi-threading. Unfortunately I have been unable to find satisfactory explanations on the net. Does your code enable two or more sections of code to execute at the same?

The project I am working on is in General Board under 3D gaming project.

Any help would be greatly appreciated.

Ric
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
wink Re: 256 Thread fast ping sweep
« Reply #6 on: May 31st, 2016, 11:59am »

Apparently, you would need to ask David Williams, as he was apparently behind creating:
GFXLIB library
I am also curious about being able to use ASM to draw super fast to the screen. Its all about stepping stones.
If David were willing to repost the research and the Library for us, maybe we could have some fun.
Its up to you David.
PLEASE?

User IP Logged

I like making program generators and like reinventing the wheel
sveinioslo
Developer

member is offline

Avatar




PM


Posts: 64
xx Re: 256 Thread fast ping sweep
« Reply #7 on: Jun 3rd, 2016, 07:29am »

Ric,

Quote:
Does your code enable two or more sections of code to execute at the same?

Yes, the same piece of code is executed in 256 threads simultaneously.

Quote:
and wondered if I could get it to go faster by multi-threading. Unfortunately I have been unable to find satisfactory explanations on the net.


There's interesting info in the answers here:

http://stackoverflow.com/questions/714905/is-it-possible-to-create-threads-without-system-calls-in-linux-x86-gas-assembly

and some technical stuff here

http://stackoverflow.com/questions/980999/what-does-multicore-assembly-language-look-like

and general info here

https://msdn.microsoft.com/en-us/library/windows/desktop/ms681917%28v=vs.85%29.aspx

Svein
User IP Logged

michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
xx Re: 256 Thread fast ping sweep
« Reply #8 on: Jun 4th, 2016, 01:37am »

Here is a product you may want to check out on assembly language and graphics.. From one of the creators of Quake.

http://www.freetechbooks.com/michael-abrash-s-graphics-programming-black-book-t78.html

And apparently you can buy the book on amazon

http://www.amazon.com/exec/obidos/ASIN/1576101746/ref=nosim/freetechbooks-20
« Last Edit: Jun 4th, 2016, 01:45am by michael » User IP Logged

I like making program generators and like reinventing the wheel
Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx Re: 256 Thread fast ping sweep
« Reply #9 on: Jun 16th, 2016, 07:59am »

Thanks guys, I'll look into it.
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls