RunCPM includes a few sample programs in Assembly, Microsoft Basic, Hi-Tech C, Turbo Pascal and DX-Forth to get you started. I also prepared a short video tutorial showing the Turbo Pascal example in action:
A few tips:
Because analogRead returns values that won't fit in a single byte, when calling function 223 in Turbo Pascal you should use BdosHL instead of Bdos to get the value returned in HL register pair, like this:
writeln(BdosHL(223, pin shl 8);The same applies to Hi-Tech C - see PHOTO.C and PHOTO.PAS examples.
Also, since MBasic does not allow direct BDOS calls, I used USR functions to call small assembly procedures encoded in DATA lines.
Happy coding on Arduino!
1 comment:
That's great! Return to good old times Speccy/80 KB with home made disk drive. One note: better then PuTTY terminal seems Kitty fork (http://www.9bis.net/kitty/) because it has keys remapping feature. So you can use keys PageUp, arrows ... with "WordStar" shorcuts.
Post a Comment