83Plus:Software:usb8x/BASIC Interface/GetIDs

From WikiTI
Revision as of 14:30, 16 July 2006 by Dan Englender (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Name: GetIDs

Function Number: 5

Minimum usb8x version: 0.10

Get the version, vendor, and product IDs from the connected device.

Inputs

None

Outputs

  • 1: Error code
  • 2: High byte of version
  • 3: Low byte of version
  • 4: High byte of product ID
  • 5: Low byte of product ID
  • 6: High byte of vendor ID
  • 7: Low byte of vendor ID

Notes

The high and low bytes of the IDs are returned separately. See the code example below for a method to combine them.

Example

{5
ExecLib
If Ans(1                    ;If GetIDs returns an error code
Return                      ; quit
Disp 256Ans(2)+Ans(3        ;Display version
Disp 256Ans(4)+Ans(5        ;Display product ID
Disp 256Ans(6)+Ans(7        ;Display vendor ID