[net.micro.cpm] Technical trivia

ACB.TYM@OFFICE-2.ARPA (12/21/84)

(everybody else puts a dummy line here. Why not?)

Speaking of technical data! I just spent most of a day discovering that BDS C 
uses the interrupt vector at location x'30' (RST 6).  I have often thought of 
using RST instructions for linkages in self relocating code BUT... I fear the 
impact on some unsuspecting user with some hardware interrupt configuration or 
some special storage locations (Some code uses the high end of interrupt vector
7 (DDT's RST location) already.  I read both CP/M documentation and BDS C 
documentation and find that in the CP/M documentation RST 6 locations are 
reserved and RST 7 is used by DDT.  I was a tad surprised to find that BDS C 
used RST 6.  Of course that is because I was using it (caught in the act!) 
although the use was unintentional (a bug!).

Jerry Sweet <jsweet@Uci-Icse.ARPA> (12/21/84)

Some errata for the BDS C version 1.50a explains how to reconfigure
the runtime to use a different RST address.  In general, it is unsafe
to use the RST locations unless your software can be reconfigured as
well.  The Z80 can arrange for hardware interrupt vectors to be placed
elsewhere in memory, but (a) not everyone has a Z80, (b) not everyone
uses the extended scheme, and (c) that still doesn't help when using
software that may already occupy the RST vectors.

-jns