marty@ism780c.UUCP (06/26/86)
I recently purchased the LogiTech compiler and am running it on an AT clone.
My purpose is two fold: a) to learn Modula 2 so I will be well positioned
to take the contract programming world by storm when the Modula 2 explosion
comes, and b) because the program I'm writing got bigger than 64k and my
Turbo Pascal compiler had to withdraw from the effort (I don't like the
overlay and chaining stuff).
Anyway, on the whole I'm very satisfied with the compiler. But this isn't
meant to be a review; I need some help on some minor points that I find
annoying.
1. Both Turbo Pascal and LogiTech M2 give me access to the BIOS
interrupts and the DOS function calls. The problem is that
Turbo gives me an easy and clear mechanism for loading values
into the upper half of a register, but LogiTech does not. At
least, I can't find it. In Turbo I can say:
Regs.AH := HighByte;
Regs.AL := LowByte;
and then do the interrupt. In LogiTech I have to do something
like:
Temp := HighByte * 256 + LowByte;
SETREG(AX,Temp);
and then do the interrupt. What I want to do is say:
SETREG(AH,HightByte);
SETREG(AL,LowByte);
but the SYSTEM module doesn't define the byte registers, only the
word registers. Is there a better way? Hopefully the compiler
does a left shift 8 rather than multiplying by 256, but even then
it's too many operations to get at something that needs to be
as efficient as possible. Which brings me to question 2:
2. Turbo has a left shift function and a right shift function, which
I find very useful for ANDing and ORing fields together. LogiTech
provides me with the type BITSET, which is supposed to be used for
ANDing and ORing (I presume), but no shift operations. Once again
I'm reduced to using multiplies and divides to position things. Is
there a better way?
These are small problems, I admit, but they certainly are annoying, which
makes me think I must be doing something wrong.
marty@ism780c.UUCP (Marty Smith)