> Recently I have seen ints such as: intxx.yy; is this something new, or I  
> just don't get out much? Is the 'yy' just the selection within the int  
> function or what?

Yes, some use this still rather unusual/new notation to concisely refer to  
interrupt calls. I am among those; you might have seen me use it here. I  
might have in fact coined some of it. Read on if you are interested in the  
details of how I use it.

The xx and yy are both two-digit (8-bit) hexadecimal numbers; xx refers to  
the interrupt number, yy to the value in register AH. If the call requires  
a value in register AX, you can refer to it with Intxx.yyyy instead. (Note  
that the specified number of digits is always used to distinguish (AH)  
8-bit and (AX) 16-bit number specifications here; this implies that one  
always has to include the leading zeros.)


If other registers are to be set, I use, for example,  
Intxx.yy(yy).zz=ww(ww) where "zz" is the register's name (say: BX, DL,  
whatever else) and ww(ww) is the hexadecimal number that the register  
needs to be set to. The equals sign there is a literal.

The parenthesis here are not literals, for the yy(yy) they indicate that  
the second half is either present or absent to distinguish AH or AX values  
as specified above. This can be done with the ww(ww) part too, but isn't  
necessary because zz explicitly specifies the register. Thus I sometimes  
lazily leave off leading zeros in the ww(ww) part. (Arguably, consistently  
padding to a full 2 or 4 digits can help clarify that the number is  
specified in hexadecimal, as numbers specified in decimal seldom include  
leading zeros.)


In principle, there can be any number of .zz=w... suffixes to specify how  
additional registers are to be set.

As it is currently an entirely (so-to-say) theoretic notation only used to  
discuss and comment on code, you can invent arbitrary other suffixes to  
append; say, .CF=0 or .NC to indicate that the Carry Flag (CF) is to be  
cleared. Just make sure you either explain them to your readers or they're  
sufficiently self-explanatory!

This can be easily extended to 32-bit registers in the same manner as the  
extension from 8-bit registers to 16-bit registers when necessary.


Regards,
C. Masloch

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to