32BITS.TXT
资源名称:ertos.rar [点击查看]
上传用户:sunrenlu
上传日期:2022-06-13
资源大小:1419k
文件大小:2k
源码类别:
操作系统开发
开发平台:
DOS
- I am extending my 16 bit DOS eRTOS to also sport eRTOS/32, a 32 bit protected
- mode DOS/32 multithreaded environment. The APIs are almost identical for both
- environments with only a few exceptions.
- Compiler
- The only supported 32 bit compiler is DJGPP. However, it's fast, it
- produces efficient code, and it's effectively free. You can debug your
- applications with the rhgdb debugger which looks a lot like Borland's
- TD albeit minus a few of TD's handy features.
- Gotchas
- A big difference is that you will typically need thread stacks twice the
- size of 16 bit eRTOS applications. If you see halts with the message
- "signature error on registers", or many other errors, it is likely your 32
- bit stack is overflowing and corrupting the thread_x structure for the thread.
- A larger thread stack will solve it immediately.
- Unimplemented
- 32 bit interrupt handlers are a bit tricky, I haven't added them yet.
- However, you can find DJGPP source code around which explains how
- to do this if you look for it.
- The rt_timerfreq() function doesn't work correctly in 32 bits. I'm still
- trying to figure out why.
- Serial Library
- The eRTOS/16 serial library is now compatible in both 16 and 32 bits.
- Network Functions
- eRTOS/16 uses my original WATTCP library. In the 32-bit world, eRTOS
- uses the WATT-32 library. WATT-32 is also available for 16 bits, but
- it consumes more memory so I opted to stay with WATTCP for 16 bits.
- WATT-32 also supports a BSD Unix style interface in addition
- to my core WATTCP routines, note however, that eRTOS application must
- not call the BSDish routines because they are not thread-safe... yet.
- Network Services
- The network service (ftp, smtp, etc.) are all coded to the classic
- WATTCP interface, which makes them portable to WATT-32.
- Still, that's not enough to guarantee them to be 32 bit compatible.
- Some changes are needed due to nuances in the DJGPP libraries compared
- to Borland libraries.