10000 DEFINT A-Z : REM make everybody here integers 10100 REM ----- this stuff must be done just once at the start 10200 INTNUM = &H63 : REM X10 interrupt number 10300 REM fetch the X10 interrupt vector 10400 DEF SEG=0 10500 INTOFFS = 4*INTNUM : REM figure vector offset 10700 XOFF=256*PEEK(INTOFFS+3)+PEEK(INTOFFS+2) : REM get X10 vector 10800 XSEG=256*PEEK(INTOFFS+3)+PEEK(INTOFFS+2) 10900 IF (XOFF <> 0) AND (XSEG <> 0) GOTO 11500 11000 PRINT "X10DRIVE isn't installed!" 11100 STOP 11500 X10=&H104 : REM set BASIC CALL entry offset 11600 DEF SEG=XSEG : REM ... and segment 12000 REM ----- now for the useful code 12100 HOUSE=ASC("A") : REM CALL parameter must be an integer! 12200 UNIT=1 : REM unit from 0 - 16 12300 ACTION=1 : REM action from 0 - 6 12400 PRINT "Making the call!" 12500 CALL X10(HOUSE,UNIT,ACTION) 12600 PRINT "Return code is",HOUSE 12700 REM ----- repeat the above as needed 12800 STOP