RetroForum Welcome, Guest. Please login or register.
March 19, 2010, 07:41:56 PM
Home Help Search Calendar Login Register

RetroForth Discussion  |  Main  |  Discussion  |  Topic: Help please with files and blocks and the OS interface « previous next »
Pages: 1 Go Down Print
Author Topic: Help please with files and blocks and the OS interface  (Read 967 times)
PaulW
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Help please with files and blocks and the OS interface
« on: June 15, 2007, 07:40:09 PM »

Hi, I am looking at RetroForth as a vehicle for accepting a port of an old Forth program I wrote many years ago.
The final target system is unlikely to be a Windows platform but I would like to use Windows for the initial development.
The original system had no standard OS as it ran on a dedicated Z80. I implemented a simple file system using 1 kb blocks.
I need to modify the file support to us 1 kb blocks instead of 512 byte blocks and understand how the interface with the OS operates.
It does seem to use some rather clever words and compiler techniques.
I should be able to sort out the importing of functions from kernel32 as I have a Microsoft Visual Studio development system.
If this type of interface with an OS has been documented more fully some where else, then please can you give me a few links.
Thanks, Paul.

I think I now know how functions are imported from kernel32. To add the Beep function I enter:
kernel32 ( to select the kernel32 vocabulary )
2 import Beep ( to seltup the two parameter function interface )
4000 1000 Beep ( plays a 4 KHz tone for 1 second and returns a positive value if the function call was successful )

I guess that with a little more effort on my part, I will understand why blocks are 512 bytes and hopefully how to change it to 1 kb.
Paul.
« Last Edit: June 16, 2007, 10:08:15 PM by PaulW » Logged
Pages: 1 Go Up Print 
RetroForth Discussion  |  Main  |  Discussion  |  Topic: Help please with files and blocks and the OS interface « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Valid XHTML 1.0! Valid CSS!