Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dfoutb()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfOutB()
Permit to send a Byte to a Port
------------------------------------------------------------------------------
Syntax:

     dfOutB(<nPort>,<nValue>) --> NIL

Parameters:

     <nPort>    Port in which to put the values
     ue>        Value to put. 0 <= nValue <= 255

Returns:

     NIL

Description:

     Permits to put a value in a port Of the value taken only in the first
     Byte

Example:

     // Program of FADEIN
     
     LOCAL nCol, nPal, R, G, B
     
     FOR nCol:= 0 TO 63
       FOR nPal:= 0 TO 255
          dfGetPal(nPal,@ R,@ G,@ B)
          IF R<nCol; R+; ENDIF
          IF G<nCol; G+; ENDIF
          IF B<nCol; B+; ENDIF
          dfSetPal(nPal, R, G, B)
       NEXT
     NEXT
     
     * _____________________________________
     PROCEDURES dfGetPal(nCol, R, G, B)
     * _____________________________________
     
     dfOutB(dfHex2Dec(" 03C7") , nCol)
     R:= dfInW(dfHex2Dec(" 03C9") )
     G:= dfInW(dfHex2Dec(" 03C9") )
     B:= dfInW(dfHex2Dec(" 03C9") )
     
     RETURN
     
     * _____________________________________
     PROCEDURES dfSetPal(nCol, R, G, B)
     * _____________________________________
     
     dfOutB(dfHex2Dec(" 03C8") , nCol)
     dfOutB(dfHex2Dec(" 03C9") , R)
     dfOutB(dfHex2Dec(" 03C9") , G)
     dfOutB(dfHex2Dec(" 03C9") , B)
     
     RETURN

See also:

     dfFadeIn(), dfHex2Dec(), dfInW()

See Also: dfFadeIn() dfHex2Dec() dfInW()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson