News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

New member as at June 4 2009

Started by SteveCurtis, June 04, 2009, 12:53:56 PM

Previous topic - Next topic

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

SteveCurtis

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

SteveCurtis

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



UtillMasm

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

SteveCurtis

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

dedndave

C for the 8051 ???? - yikes !  :dazzled:
assembler is the only way to fly for microcontrollers

Farabi

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
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

SteveCurtis

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 

SteveCurtis

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

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

UtillMasm

i think, comment is noise.

so i hate comment.
:wink

SteveCurtis

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

Mark Jones

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. 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
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

dedndave

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

SteveCurtis

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. 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