The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: SteveCurtis on June 04, 2009, 12:53:56 PM

Title: New member as at June 4 2009
Post by: SteveCurtis on June 04, 2009, 12:53:56 PM
Hello all. I thought I would post here to announce that I am actually a person, especially after reading the material about spam bots and other jolly nuisances in the introductory area.

My interests are CNC machines and the use of PC hardware to behave as an embedded and dedicated systems with an emphasis on fast, jitter free hardware interrupt responses.

I'm also interested in Digital Signal Processing in the PC, mainly as the core speeds are so fast and the platform is so inexpensive!

My background is in electronic engineering but moved to programming and then a 7 1/2 year spate of purgatory doing I.T. infrastructure for a large blue logo-ed Australian banking corporate as a contractor on 3 and 6 month rotations.

Basically now I want to get my hands dirty again and do some proper creative work. Looking at MASM32 makes me again feel like a complete novice, something that has recurred so many times in the past 20 years.  Hopefully I can put some hours in now and get with the inner workings of MS operating systems and write from the ground floor to find out what really goes on. It will be fun and I have so much to learn.

Steve
Title: Re: New member as at June 4 2009
Post by: dedndave on June 04, 2009, 01:11:48 PM
hi Steve - welcome to MASM32
i am in much the same boat, or at least, i was a few months ago
even though i had years of experience programming 16-bit assembler, everything looked foriegn
if you google Iczelion's tutorials, as well as Kip Irvine, they can get you started
i think one of the links in the upper right corner has Iczelion
- Dave
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 04, 2009, 02:02:53 PM
Quote from: dedndave on June 04, 2009, 01:11:48 PM
hi Steve - welcome to MASM32
i am in much the same boat, or at least, i was a few months ago
even though i had years of experience programming 16-bit assembler, everything looked foriegn
if you google Iczelion's tutorials, as well as Kip Irvine, they can get you started
i think one of the links in the upper right corner has Iczelion
- Dave


Many thanks Dave.
Yet another steep (brick wall) learning curve to be sure! I have spent a number of hours today looking around and have followed up many links to other ASM type sites e.g. 'Donkey' and GoAsm some others. I am amazed by the sheer number of opportunities to get material once I started looking in earnest.  I bought the Jeff Duntemann book 'Assembly Language Step By Step' which is based around NASM and the IDE that comes with package and that got me kicked off recently. However I really want to unpick the MS windows stuff and probably write Win32 code more than the Linux bent this latest book has. What I really want to get to, is have some embedded Single board computer x86 machines running assembler doing CNC control, talking to a host that runs a Delphi app on WinXP via Ethernet, so bye bye RS232...(it's a plan....! :wink)

Steve 

Title: Re: New member as at June 4 2009
Post by: hutch-- on June 04, 2009, 02:09:02 PM
Hi Steve Welcome on board. You should have a ton of fun here  :bg
Title: Re: New member as at June 4 2009
Post by: UtillMasm on June 04, 2009, 02:11:25 PM
hi, emmmh, welcome...
:green2
Title: Re: New member as at June 4 2009
Post by: dedndave on June 04, 2009, 02:23:38 PM
i have done a little work with embedded controllers
the one i played with the most was a 486dx in a hand-held unit
i think that project tanked - lol - not sure - i did my bit and got out of there
the guys running that thing were better at spending money than making it
i designed the keyboard and programmable audio interface and wrote the 16-bit driver routines
the guy doing their software converted the small routines to 32-bit, i suppose
the hardware did all the work
Title: Re: New member as at June 4 2009
Post by: Mark Jones on June 04, 2009, 04:20:16 PM
Welcome Steve, sounds like fun. If you want even more options, check out http://www.microchip.com/ or http://www.atmel.com/default1.asp --- they make full-featured single-chip microcontroller solutions today with amazing capability. It's entirely possible to control a 5-axis CnC from one of these lower-end chips (sounds like one hell of an engineering task though, good luck!) :bg
Title: Re: New member as at June 4 2009
Post by: Vortex on June 04, 2009, 05:33:12 PM
Hi Steve,

Welcome to the forum.
Title: Re: New member as at June 4 2009
Post by: Farabi on June 04, 2009, 08:43:24 PM
Welcome to the forum.
If what you mean with signal processing is face recognition or speech recognition, we had same interest. I Hope we can learn each other. Currently I studying OpenCV, and since Im no good at reading math symbol am not into the inner code of OpenCV, if you have understand basic of assembler coding I will give you my code to take a look. Just tell me when you are ready.

PS:
MASM License is not allowed us to do Open Source thing, and Im fine with it, so dont spread the code.
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 12:27:35 AM
Quote from: Mark Jones on June 04, 2009, 04:20:16 PM
Welcome Steve, sounds like fun. If you want even more options, check out http://www.microchip.com/ or http://www.atmel.com/default1.asp --- they make full-featured single-chip microcontroller solutions today with amazing capability. It's entirely possible to control a 5-axis CnC from one of these lower-end chips (sounds like one hell of an engineering task though, good luck!) :bg

Hi Mark,
Thanks for that. I will take a gander. I have seen some of the Atmel offerings in the past but I'll certainly take a closer look here. I guess the main thing I like about the PC architecture though is that is is so ubiquitous and there are just so many versions that pretty much do the same thing architecturally. I must have 10+ working Pentium II or better boxes given to me for free. Also I came by 4 new 1.8Ghz dual core single board PCs (industrial) for $100 each - with CPU's! All I had to to do was buy 2GB ram for each.. I also have 2 new 486DX 133, half size single board PCs, older but still gruntier than anything I'm going to build bespoke wise... ... Anyway you get my drift..

The main issue with getting to the power of the machine is the MS OS's and allowing access to hardware I/O. So if I can unpick things and understand what-is-what, I might be able to have my cake and eat it... I can build an ISA bus peripheral boards no problem. (AD's DA's, Ports etc) ..I would buy PCI boards (too painful to build these). However the CPU's are all very grunty. Even a lowly 1GHz Celeron. No embedded system I will ever build will have this core of memory/power that has been so thoroughly tested and developed..... :dazzled:

Steve




Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 12:40:59 AM
Quote from: Farabi on June 04, 2009, 08:43:24 PM
Welcome to the forum.
If what you mean with signal processing is face recognition or speech recognition, we had same interest. I Hope we can learn each other. Currently I studying OpenCV, and since Im no good at reading math symbol am not into the inner code of OpenCV, if you have understand basic of assembler coding I will give you my code to take a look. Just tell me when you are ready.

PS:
MASM License is not allowed us to do Open Source thing, and Im fine with it, so dont spread the code.

Hi Farabi,

I'd love to share what you are up to. Bear in mind I'm getting back to this stuff after 15 years of not doing it. My DSP needs brushing up also! I have a very good conact with image processing. He is a commercial chap and I have worked for him over the years so he might be a useful contact. I've spent that past few years (since 2000-2008) working for a bank in I.T. infrastructure, so my brain is pretty soft right now.. My main interest for DSP is control systems, filtering, Fourier transforms, adaptive control and such, but there is much for me to come to terms with just getting things going with assembler and the operating system(s). Stay tuned though I'd be happy to play with anything. No problems not spreading code. If anything that I do becomes remotely commercial I will be addressing these issues for sure. This is all a learning exercise for now..

Steve


Title: Re: New member as at June 4 2009
Post by: Farabi on June 05, 2009, 02:16:56 AM
Steve:
I though you are student, I guess you're a professional. But Okay I will send the source to you, I think I'll send it within 4 days because my laptop is borrowed by my sister. I hope you can learn something from it.
Title: Re: New member as at June 4 2009
Post by: hutch-- on June 05, 2009, 02:35:56 AM
Just a note on the following comment.

> MASM License is not allowed us to do Open Source thing, and Im fine with it, so dont spread the code.

You can happily spread your code around, give it away or sell it but you cannot use it as leverage to force others to do the same, this is the problem with "open source", it is a restrictive licencing system that is excluded by the MASM and Microsoft licence.
Title: Re: New member as at June 4 2009
Post by: Farabi on June 05, 2009, 02:53:04 AM
Quote from: hutch-- on June 05, 2009, 02:35:56 AM
Just a note on the following comment.

> MASM License is not allowed us to do Open Source thing, and Im fine with it, so dont spread the code.

You can happily spread your code around, give it away or sell it but you cannot use it as leverage to force others to do the same, this is the problem with "open source", it is a restrictive licencing system that is excluded by the MASM and Microsoft licence.

Oh thanks, I guess I miss understand the license.
Title: Re: New member as at June 4 2009
Post by: UtillMasm on June 05, 2009, 02:58:34 AM
open souce is release source, no more anything else in china.
Title: Re: New member as at June 4 2009
Post by: Farabi on June 05, 2009, 03:04:56 AM
I made a new topic here http://www.masm32.com/board/index.php?topic=11586.0
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 06:06:44 AM
Quote from: Vortex on June 04, 2009, 05:33:12 PM
Hi Steve,

Welcome to the forum.
Hi Vortex,
Thanks for the welcome. I followed some of your links yesterday and I 'm really impressed/amazed/thankful for the calibre of what is available in and around this forum. For example, I like the idea of the High Level Assembler as this can allow one to retain a visual sense of what is being done without getting confused by the repetitive detail. I also find the effort put into the MACROS.ASM file in MAMS32 to be a similarly powerful device.

The combination of boiler plate code coupled with the full retention of programmer control is an approach I applaud and one I expected to have when writing C for lowly 8051 processors. In the PC though we are all expected to live in a very abstract 'Top down' world, say in Visual Basic or Delphi. As useful as this is, I think however, some time spent in the grit and detail of assembler will (I really think), help with all aspects of ones work. It pays dividends I reckon, to actually know the details, even if you are hidden from them much of the time.

Hopefully one day I will be able to contribute in the reverse direction.  In the meantime, some proper late night slogging required from me....

Steve
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 06:28:45 AM
Quote from: Farabi on June 05, 2009, 02:16:56 AM
Steve:
I though you are student, I guess you're a professional. But Okay I will send the source to you, I think I'll send it within 4 days because my laptop is borrowed by my sister. I hope you can learn something from it.

Hi Farabi,

I have earned my living from I.T. for 20+ years. This does not make me anything  :bg  I have no pretension about being professional so don't worry there.. We are all learners at different stages of learning, so I am a student..

We are also, (every single one of us) resting on the shoulders of giants. George Boole, Charles Babbage, Von Neuman and so forth.. If it weren't for these genius pioneers, none of us would have these fantastic tools to play with.... I am really glad to be able to be involved and to share the enthusiasm with like minds. That is it -- pretty much.... :dance:

Send me your code, I'd love to have a look.

Steve


Title: Re: New member as at June 4 2009
Post by: UtillMasm on June 05, 2009, 06:34:08 AM
Quote from: SteveCurtis on June 05, 2009, 06:28:45 AMSend me your code, I'd love to have a look.
you are a real new member, now.
:toothy
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 07:02:46 AM
Quote from: UtillMasm on June 05, 2009, 06:34:08 AM
Quote from: SteveCurtis on June 05, 2009, 06:28:45 AMSend me your code, I'd love to have a look.
you are a real new member, now.
:toothy
Hey Thanks Utillmasm  :wink 

Tell me about what you are up to....??

Where are you in China?

Steve
Title: Re: New member as at June 4 2009
Post by: dedndave on June 05, 2009, 10:42:57 AM
C for the 8051 ???? - yikes !  :dazzled:
assembler is the only way to fly for microcontrollers
Title: Re: New member as at June 4 2009
Post by: Farabi on June 05, 2009, 11:22:58 AM
Quote from: SteveCurtis on June 05, 2009, 06:28:45 AM
Quote from: Farabi on June 05, 2009, 02:16:56 AM
Steve:
I though you are student, I guess you're a professional. But Okay I will send the source to you, I think I'll send it within 4 days because my laptop is borrowed by my sister. I hope you can learn something from it.

Hi Farabi,

I have earned my living from I.T. for 20+ years. This does not make me anything  :bg  I have no pretension about being professional so don't worry there.. We are all learners at different stages of learning, so I am a student..

We are also, (every single one of us) resting on the shoulders of giants. George Boole, Charles Babbage, Von Neuman and so forth.. If it weren't for these genius pioneers, none of us would have these fantastic tools to play with.... I am really glad to be able to be involved and to share the enthusiasm with like minds. That is it -- pretty much.... :dance:

Send me your code, I'd love to have a look.

Steve




I put my code here http://www.masm32.com/board/index.php?topic=11586.0
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 12:00:34 PM
Quote from: dedndave on June 05, 2009, 10:42:57 AM
C for the 8051 ???? - yikes !  :dazzled:
assembler is the only way to fly for microcontrollers

Hi Dave,
Yep.. written quite a bit of C for the '51 (and Z80).  Sending you a private email about it.
The compiler was pretty smart however and produced fast code...
Steve 
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 12:17:24 PM
Quote
I put my code here http://www.masm32.com/board/index.php?topic=11586.0

Hi Farabi,
I looked at your code. You have put heaps of work in there! Great effort. What would help me as a novice to MASM32 is more coments about what the aim of the code is and what you were attempting as each step. Otherwise you obviously got a good handle on the technical programing apsects. What are the XML files? Have they been generated by part of your program?

Kind regards,
Steve
Title: Re: New member as at June 4 2009
Post by: Farabi on June 05, 2009, 02:07:22 PM
Quote from: SteveCurtis on June 05, 2009, 12:17:24 PM
Quote
I put my code here http://www.masm32.com/board/index.php?topic=11586.0

Hi Farabi,
I looked at your code. You have put heaps of work in there! Great effort. What would help me as a novice to MASM32 is more coments about what the aim of the code is and what you were attempting as each step. Otherwise you obviously got a good handle on the technical programing apsects. What are the XML files? Have they been generated by part of your program?

Kind regards,
Steve
Yes the XML is generated by a part of my program. I dont understand the rest of your words, Im sorry, can you rewrite it on a simpler words?
Sure comment is good, especially if you comment how does it work.
Title: Re: New member as at June 4 2009
Post by: UtillMasm on June 05, 2009, 02:23:53 PM
i think, comment is noise.

so i hate comment.
:wink
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 05, 2009, 02:53:03 PM
Quote from: Farabi on June 05, 2009, 02:07:22 PM
Quote from: SteveCurtis on June 05, 2009, 12:17:24 PM
Quote
I put my code here http://www.masm32.com/board/index.php?topic=11586.0

Hi Farabi,
I looked at your code. You have put heaps of work in there! Great effort. What would help me as a novice to MASM32 is more coments about what the aim of the code is and what you were attempting as each step. Otherwise you obviously got a good handle on the technical programing apsects. What are the XML files? Have they been generated by part of your program?

Kind regards,
Steve
Yes the XML is generated by a part of my program. I dont understand the rest of your words, Im sorry, can you rewrite it on a simpler words?
Sure comment is good, especially if you comment how does it work.

Hi Farabi,

Sorry about too many words  :red  What I was trying to say is that I need extra words from you in your code to tell me what you are doing more carefully.. I cannot guess easily from code alone, since I am not so good as you with MAMS32. But your code looks very powerful from what I can understand. :bg

Steve
Title: Re: New member as at June 4 2009
Post by: Mark Jones on June 06, 2009, 04:33:41 PM
Steve, I can see your desire to use x86 hardware, it is readily available, well-tested, and cheap. However, you will probably discover, when implementing the actual hardware control aspect of the code, that using Windows as the OS can be problematic. This is due to the preemptive multi-tasking framework itself, which basically means that any hardware I/O from windows is not guaranteed to be timeslice-accurate, because interrupts and scheduling functions are always interrupting the I/O. For things like printers, this is not a problem, as a large buffer is used not only in software, but in the printer as well. But if you are controlling stepper motors from a parallel port for instance, then this will be a serious issue. (DOS does not have this problem obviously, however DOS assembler is a completely different animal.) One such product already exists for DOS: http://www.dakeng.com/turbo.htm

One way around this, is to use a so-called Ring-0 parallel port driver, which effectively makes parallel I/O a higher priority than the OS itself. There are some threads here about this already. If you wanted to use the parallel port, this is one option. Serial would be too slow, and require some extensive hardware. (Any solution is going to require at minimum, stepper drivers and limit sensors unless a pre-built device is used.)

Also, some of the PIC and AVR microcontrollers linked earlier have built-in USB support---seeing that USB is so fast and these microcontrollers have RAM onboard, they could buffer incoming data easily and require no special driver. While adding significant complexity, they also add significant capability.

Also another PC language option to consider is PowerBasic (http://www.powerbasic.com/). It is a flavour of Basic with integrated assembler support. We have a separate sub-forum here for questions pertaining to PB assembler.

Misc: http://www.otocoup.com/Technique_e.htm
Title: Re: New member as at June 4 2009
Post by: dedndave on June 06, 2009, 04:50:26 PM
i think if i wanted to use windows with an embedded controller, i might try to use win98
that will give you full access to all I/O
ms may offer an xp or vista version for emedded systems, too
although, i would think the bloat-factor would be prohibitive
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 07, 2009, 12:02:36 PM
Quote from: Mark Jones on June 06, 2009, 04:33:41 PM
Steve, I can see your desire to use x86 hardware, it is readily available, well-tested, and cheap. However, you will probably discover, when implementing the actual hardware control aspect of the code, that using Windows as the OS can be problematic. This is due to the preemptive multi-tasking framework itself, which basically means that any hardware I/O from windows is not guaranteed to be timeslice-accurate, because interrupts and scheduling functions are always interrupting the I/O. For things like printers, this is not a problem, as a large buffer is used not only in software, but in the printer as well. But if you are controlling stepper motors from a parallel port for instance, then this will be a serious issue. (DOS does not have this problem obviously, however DOS assembler is a completely different animal.) One such product already exists for DOS: http://www.dakeng.com/turbo.htm

One way around this, is to use a so-called Ring-0 parallel port driver, which effectively makes parallel I/O a higher priority than the OS itself. There are some threads here about this already. If you wanted to use the parallel port, this is one option. Serial would be too slow, and require some extensive hardware. (Any solution is going to require at minimum, stepper drivers and limit sensors unless a pre-built device is used.)

Also, some of the PIC and AVR microcontrollers linked earlier have built-in USB support---seeing that USB is so fast and these microcontrollers have RAM onboard, they could buffer incoming data easily and require no special driver. While adding significant complexity, they also add significant capability.

Also another PC language option to consider is PowerBasic (http://www.powerbasic.com/). It is a flavour of Basic with integrated assembler support. We have a separate sub-forum here for questions pertaining to PB assembler.

Misc: http://www.otocoup.com/Technique_e.htm

WOW!! Thanks for the in depth suggestions and the time and trouble for the reply :dance:. Actually I was aware of these aspects regarding the interference of the OS regarding HW and such. I want to get beyond parallel port i/o though..I have already written a VXD under W95 as a C++ app using VTOOLSD which kicked me off in this general direction. I built 3 DSP56002 Motorola based servo controllers that sat in the ISA slots of a Pentium machine (must be 10+ years ago now).  This ran under Delphi 2 and I was very pleased to be able to assemble and load the DSP56K program and control the PID servo values from scroll bars and all manner of things by using the DEVICEIOCTRL calls into the ring0 code. All well and good.

I was though, still using the DSP CPU to perform the basic control and numerical functions and it was quite OK. What i realised though, was that the CPU power of the desk top machines was easily rivalling any DSP I could build on any $$ budget that was meaningful. e.g. A 200MHz Pentium was already 5 timer as fast as my DSP back then. Granted the DSP had specialized hardware and instruction architecture, but the sheer MIPS available on the Intel CPU looked tantalising....

In the meantime I then, thought I would migrate to writing WDM drivers under windows 2000 --- since I managed to get that far under W95. However I realise that the subject is so dense I could easily spend the rest of my natural life just becoming proficient with the WDM model, without writing a driver for my own purposes. I was a rude shock... I bought several books (each 2 inches thick -plus) about writing WDM device drivers... I then realised the parable about the engineers who wanted to drain a swamp and spent all their time fighting off alligators...was I there to develop a control system, or write compatible W2000 device drivers??? I would have to choose, it seemed.. plus writing kernel mode WDM drivers is a hard thing to find information on and expensive. You are pretty much on your own, especially when you have a full time job that is nothing to do with writing device drivers. :wink

In joining the MASM32 forum, I have wanted to become more proficient writing x86 assembler, since in learning to do this, I have already started to gain useful insights about the x86 CPU architecture, memory addressing and such. In the past I have also written several 16 bit DOS 6.22  applications (Borland Turboc 3.0) that perform pretty darn well 'realtime' for my uses, where the interface to the ISA mounted DSP servo systems is concerned. Interrupts respond in around a microsecond or so with a small amount of jitter on a 1GHz Celeron. This version has no keyboard, mouse or display(except for debugging) and merely contacts the world via the serial port. I hijacked int 5 (printer 2 int) and use this to communicate with the DSP 56002 servos pretty seamlessly (DSP asserts Int5 when done moving the XYZ servos) via a circular buffer. Of course the serial port is a C interrupt function that talks to an other circular buffer at the character , CRLF line level, before the GCODE'S are parsed. Since this is all under DOS6.22 I have full control of the interrupts and hardware, but with a 16 bit memory architecture and 16 bit instruction set ( but fast I grant you!). 

Still I found the power of the CPU these days (3GHz clock) very tantalising. What I am prepared to do for an experiment is to forego ANY operating system at all and treat the whole x86 motherboard  as a souped up 8051 system as I would have for any old embedded system. To this end  I am hoping to write a protected mode 32bit bootstrapper, that only launches my application and that's all. To accomplish this, a bit of an effort is still required in assembler.. and yes --I will be forgoing lots of other hardware accessibility (network card, disk I/O etc) but with the cost of x86 platform hardware being so low in comparison with bespoke hardware development of my own, I don't care  ::) if the system is crippled by other standards!! Gimme the RAM, the CPU & coprocessor and access to the PCI, or ISA buses and I will be happy  :dance:

Who knows -- I can always work on the other I/O connectivity as time permits, perhaps have one CPU in a dual,  doing mundane OS tasks, and another dedicated to realtime kernel mode functionality -- if I ever get to write a proper WDM device driver. And it might have to be that it runs under LINUX or QNX or Win-CE or any number of commercial realtime Os's instead of MS desktop Os's. When I have money, maybe I'll just buy them and stop tilting at windmills. Until then, learning x86 assembler is still worthy enough I reckon!!  :bg

In the meantime I will be very happy to learn more "under the hood" functionality regarding the MS operating systems as this will still be useful for my other programming in general (Delphi, C++ or VB, whatever...) It never hurts to know the context of your work in better detail, as the time becomes available...and now is the time for me. I'm getting older (54yrs) and I'd better jump to it!! :wink

Thanks again for your reply. I'm very grateful to have access to such a diverse range of people.
Regards,
Steve
















Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 07, 2009, 12:30:29 PM
Quote from: dedndave on June 06, 2009, 04:50:26 PM
i think if i wanted to use windows with an embedded controller, i might try to use win98
that will give you full access to all I/O
ms may offer an xp or vista version for emedded systems, too
although, i would think the bloat-factor would be prohibitive

Hi Dave,
You are correct-a-mundo of course! However, see my (extensive) reply to Mark Jones. I've been there and still I want more!! Seriously though, the numerical capacity of unfetterd access to the CPU on a x86 machine is worth the effort I reckon. And the effort will probably produce useful side benefits anyway. I have rarely been sorry for any work I've put in over the years. It will still teach me something. Just might not be what I intended at the time!
Regards,
Steve

Title: Re: New member as at June 4 2009
Post by: Alloy on June 07, 2009, 12:31:56 PM
Welcome to the board Steve.  Another language option is PureBasic, http://www.purebasic.com/ . It includes inline FASM syntax assembler support, compiles to Windows(32 bit and 64 bit),Mac and Linux, OpenGL/ DirectX7 support and an integrated editor.
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 07, 2009, 01:00:28 PM
Quote from: Alloy on June 07, 2009, 12:31:56 PM
Welcome to the board Steve.  Another language option is PureBasic, http://www.purebasic.com/ . It includes inline FASM syntax assembler support, compiles to Windows(32 bit and 64 bit),Mac and Linux, OpenGL/ DirectX7 support and an integrated editor.

Hi Alloy,

Thanks for that, Yes I had a quick gander. The user tesimonials are very encouraging. The point for me though is not so much the langauge per-se. It is the under the hood capacity to get free access to CPU/RAM/I-O and bypass the OS. I've been down a few routes inclusing VXD under W95, WDM for W2000(NT)  and even looked at Callgates in NT (forgot to mention that one in my previous post to Mark). None of these reallty address the fundamental problem though. Simple I/O access is not what I what.

I want jitter free interrupts and PCI I/O to say ADC's, DAC's, Counter timers, ports and encoders (probably via Avago (HP) HCTL-2032 or similar.

For DSP servo or filtering functions, I want to have the CPU interrupted at tens of Khz, jitter free. For each servo, then, a simple dedicated embedded x86 control board controls it. I can separate out the OS specific user type functions and have the 'dumb' nodes doing high speed, but inflexible work. Then one central platform then doing the user interface, running standard OS.

The difficulty comes when you try and fit a square peg into a round hole and have the OS do "everything".. User interface and realtime.

There are companies around that offer that sort of thing under WinXP (at a massive price!!!). I don't want that.

And it's too time-expensive for me to do WDM software development for one man  just to make my design compatible with Windows ::) .... So I'm prepared to have several 'crippled but fast' x86 nodes talking to one main administrative hub, of course with that main hub running Winxp or something!

Regards,
Steve
Title: Re: New member as at June 4 2009
Post by: Mark Jones on June 07, 2009, 04:38:15 PM
Hi Steve, sounds like you're well on your way to realizing your vision. :bg A few of us here (myself excluded) have experience in programming so-called real-mode (versus the "protected mode" of a typical OS like Windows), however the concensus will likely be that it is very difficult. I can't help you much there, but I can offer one more link which may be helpful if you wish to persue a Windows solution: Four-F's Kernel-Mode Driver Tutorial for MASM32 (http://www.freewebs.com/four-f/)

It may be possible to write a WDM driver in MASM32 which will do what you want. (The bonus to WDM, is that a user-level application can communicate with the WDM driver, so you won't have to reinvent the wheel when it comes to character generation, memory allocation, threading, etc. like would be needed in real-mode.) The trick as I see it, would still be accurate timing. Perhaps a multimedia timer could give the accuracy needed. I would suggest opening a new thread in the Workshop or Laboratory sub-forums here, where specific topics such as these can be hammered into shape. :U
Title: Re: New member as at June 4 2009
Post by: dedndave on June 07, 2009, 04:45:12 PM
if you have hardware generating interrupts at that rate, i would suggest you use some
type of circuit to handle that part of the interface (to act as a go-between buffer)

some things are just more easily handled by hardware
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 08, 2009, 03:59:27 AM
Quote from: dedndave on June 07, 2009, 04:45:12 PM
if you have hardware generating interrupts at that rate, i would suggest you use some
type of circuit to handle that part of the interface (to act as a go-between buffer)

some things are just more easily handled by hardware

Hi Dave,
The thing is... I have seen single CPU systems handle interrupts at the 20Khz rates PLUS under W95. The PC architecture can handle much more than this. What gets in the way is the pre-emptive multitasking nature of WinNT based systems as already suggested by the others.

The Microsoft NT based OS says, "You can have your hardware interrupt. Keep it short, and we will defer the bulk processing of your interrupt to some later time".. I think these are Deferred Procedure calls and they fit the nature of the OS in that does not like to be hogged for time, but has plenty of average bandwidth to do processing as far as a user is concerned.

The pre-emptive and time slicing nature of the OS and the system also means that while average data rates are very high, instantanous rates though can vary considerably, givjng rise to jitter in the data timing. I want to avoid that by getting rid of the OS all together on the servo nodes.

A sound card has the buffering you describe, and also the off chip DSP processing, becuase it must coexist in a Windows environment. It buffers and then bursts so that the average datarates are very high and the burst interruptions (jitter) are hidden by the buffering.

I want to separate MS Windows from the hardware and run my own application, (NO OS at all --or a very small footprint OS)  uleashing the PC architecture from the overhead and my software from the burden of compatibility. That's my point.  I don't mind no character generation and such as the only comms will be serial port....Other machines will do that....The target will only understand numbers..... :wink

I wil look at another forum to chase this to the ground as Mark Jones suggests. Getting a bit specific for this forum maybe..   :red

Regards,
Steve
Title: Re: New member as at June 4 2009
Post by: dedndave on June 08, 2009, 04:45:59 AM
oh - i see - well you need to write an OS then - a bare-bones one
even that is a bit complex if you want to use protected mode
it will require a good understanding of the CPU chip you are using, as well as the BIOS
Title: Re: New member as at June 4 2009
Post by: SteveCurtis on June 08, 2009, 12:11:41 PM
Quote from: dedndave on June 08, 2009, 04:45:59 AM
oh - i see - well you need to write an OS then - a bare-bones one
even that is a bit complex if you want to use protected mode
it will require a good understanding of the CPU chip you are using, as well as the BIOS


Hi Dave,
Yep I think you are correct. Perhaps not a full OS. I have seen a few like UCos that give me what I imagine I want. Jean Gareau has a simple 'boot to protected mode' OS that can launch a protected mode 32bit flat memroy model and it looks like what I want!! The Book is on order from Amazon. There is also the four-F's WDM assembler driver material as suggested earlier, but that pre-supposes that I stick with a Windows OS at all...

Many 8051 and Z80 type applications were simply main loops with a few branches and several hardware interrupts (serial port I/O) with a simple command processor (switch statement). A real minimum system and no proper OS at all. 

I want to do the same for the x86 platform. Then it will be very deterministic and should easily handle hardware interrupts in the 10's of Khz and have a minimum jitter.  I will have sacrificed much of the available functionality of a true OS, but I can make that tradeoff happily if I get 'real time' (minimum jitter) -- and heaps of numerical processing power one expects from a DSP in other scenarios.

I think I might put my toe in the water in one of the other forums to follow this up.

Thanks for your contributions Dave and Mark and Vortex all the other guys. I know I'm nuts... :lol

Steve