FAQ

Questions

Why does my Basic program not detect my card reader? You must specify how your card reader is connected by use of predefined ComPort variable or by set ZCPort inside your autoexec.bat. You may also specify the default reader by use of the development software. Within ZeitControl Professional IDE choose menu "Options", "Environment" and then select the reader within tabsheet "Card Reader". Even if using ComPort variable my card reader is not detected. Development software does support certain ZeitControl propritary serial port card reader and any PC/SC compliant card reader.
To use a PC/SC compliant card reader you have to install the device drivers for this reader. The predefine ComPort variable has to be set to 100 or above. 100 will specify the default PC/SC compliant card reader. By default this is the first PC/SC card reader listed by the PC operating system. Above that, a ComPort value of 101 will specify (again) the first PC/SC compliant card reader, 102 the second, 103 the third .. and so on.
For ZeitControl serial port card readers you do not need any device driver. They are supported by BasicCard Software itself. Just choose the ComPort variable value in range 1 to 4 according to serial port used for connecting the card reader to you PC.
Can I copy my ..... smart card to your BasicCard? No you can't! We have been asked this quite often. A smart card is a security device and not just a piece of memory. So no you cannot copy a smart card as you can copy a floppy disk or a CD.
Anyway if you are currently using another smart card for your lawfully owned smart card based application, you may think about emulating your existing card by use of a BasicCard. But for this you need to have the full specification regarding command set of previous used card and all cryptographic keys of your existing smart card.
Is the value of Rnd generated by a function or by the help of a hardware generator? This depend on BasicCard type. Currently (March 2009) the following is true for all cards delivered by ZeitControl:

For Enhanced BasicCards, the card has no hardware generator. The Enhanced BasicCards contain a unique manufacturing number which cannot be read from outside the card. The Rnd function uses this number to generate random numbers which are different for each card.

For Professional and MultiApplication BasicCards, the random number is generated by use of a hardware random number generator.

When should WTX be called in a BasicCard program? At the start of a command. The Block Waiting Time BWT is reset every time a command is issued. For all current BasicCards the default value for BWT is 12.8 seconds when assuming a typical card clock of 3.57MHz. You can override these reset values with a #pragma ATR statement. See manuals for details. How can I know when I need more time? The simplest way is to experiment! If you think a command may need more than 1 second, you can call "WTX 5". It can't do any harm. What is wrong with "ReDim A()"? Empty bounds specifiers are not allowed in ReDim statements (see "3.6 Arrays"). Older versions of the compiler failed to handle this syntax error correctly. Can I delete variables from EEPROM at run-time, to save memory? No. String contents can be freed (e.g. S$ = "") but the 2-byte string pointer cannot.Aim: I want to be able to store text in the card EEPROM and to erase them later.Use the file system in the Enhanced BasicCard. I get a compiler error when compiling the following source code: Des(-1,5,Enc$)Use the following call instead: Enc$ = Des(-1,5,Enc$) The following code: S$ = Des (1,5,S$) S$ = Des (-1,5,S$) should restore S$ to its original value. Why doesn't it? The string parameter used in a Des function call must always be 8 bytes long. If the string is longer than 8 bytes, only the first 8 bytes are encrypted/decrypted. So the above example will only work if S$ was 8 bytes long to start with. How can I create a DES certificates without an appended &H80 byte? The following Basic code will do it: Function Cert$(DesType, Key$, Data$)
  Private C As String*8 ' Certificate is assembled here
  Private D As String*8 ' Data is copied here for Xor
                        ' operation
  REM Long data types are most efficient
  REM for Xor operation
  Private CL As Long At C, CR As Long At C+4
  Private DL As Long At D, DR As Long At D+4
  Private I: For I=1 To Len(Data$) Step 8  
    D=Mid$(Data$, I, 8) ' Zero-pads the last block
    CL=CL Xor DL : CR=CR Xor DR ' Fastest possible Xor
    C=Des(DesType, Key$, C) ' Yes, this works!
  Next I
  Cert$=C
End Function
How do I get more information about memory usage for my BasicCard application? A map file can be created. This file includes information about memory usage. A map file is created if the corresponding compile option is specified in project options. See manual for details.