That's kinda the point ... you can't write the driver in Pascal and thus have to give up all of the safety the language was intended to provide.
Modula 2 sucked at bit banging although it did Pascal two better. It allowed "open ended" array parameters - the actual array size and index bounds could be determined at runtime via library functions which enabled array handling functions to be written generically. It also allowed data structures to be accessed as "array of word". However, the size of a "word" was implementation dependent so this feature was of limited value.
Modula 3, designed by DEC and having no relation to the Wirth languages aside from some similarity of syntax, is a modern, strictly typed, object oriented language designed for both application and system level programming. Modula 3 gives the programmer full access, but in a controlled way. Modula 3 divides the world into "safe" and "unsafe" code. "Safe" code does not allow pointers, can perform only a defined "meaningful" subset of possible data conversions and is GC'd by default. "Unsafe" code must be segregated within a library module, but can do pretty much anything it wants: access hardware, use pointers, arbitrarily access memory and data structures, perform arbitrary data conversions, bypass the GC and do custom memory management, etc. There are strict rules governing how data is to be shared between "safe" and "unsafe" code.
Modula 3 is very similar to Ada without subtyping.
Well ... C was intended to be a "portable assembler" for writing operating systems. That design goal required that it provide (nearly) all the power of assembler while abstracting just far enough from the machine to make programs easily retargetable.
No one was forced to use C for general purpose programming. That shift occurred mostly because it was there, it could do what people needed and very few good alternatives were available.
George ============================================== Send real email to GNEUNER2 at COMCAST dot NET