DS
BASIC keyword | |
Keyword: | DS |
Abbreviation: | - |
Type: | system variable |
Token code: | None |
Handling routine in BASIC ROM: |
?–? ?–? |
List of all BASIC keywords |
Remark: This article describes the BASIC system variable DS in Commodore BASIC V3.5 or higher.
Type: System variable General Programming-Syntax: DS
The BASIC system variable DS returns the status number of an attached disk drive, the last accessed drive will be accessed to get the status.
After getting the status, the error indicating LED on the drive stops blinking and the error status is cleared.
Examples[edit | edit source]
PRINT DS
Result, e.g.
73
Floppy Command[edit | edit source]
100 COPY "F" TO "F-KOPIE" 110 IF DS THEN PRINT "DISK-FEHLER AUFGETRETEN:": PRINT DS$
The COPY command basically runs parallel to the programme, i.e. the BASIC programme does not wait for the floppy command to be completed. The programme is only forced to wait for the COPY command to finish when it is explicitly requested to DS.
Using in BASIC V2[edit | edit source]
100 OPEN 1,8,15 110 INPUT#1,DS 120 CLOSE 1
See also[edit | edit source]
ABS | AND | APPEND | ASC | ATN | AUTO | BACKUP | BANK | BEGIN | BEND | BLOAD | BOOT | BOX | BSAVE | BUMP | CATALOG | CHAR | CHR$ | CIRCLE | CLOSE | CLR | CMD | COLLECT | COLLISION | COLOR | CONCAT | CONT | COPY | COS | DATA | DCLEAR | DCLOSE | DEC | DEF FN | DELETE | DIM | DIRECTORY | DLOAD | DO | DOPEN | DRAW | DS | DS$ | DSAVE | DVERIFY | EL | ELSE | END | ENVELOPE | ER | ERR$ | EXIT | EXP | FAST | FETCH | FILTER | FN | FOR | FRE | GET | GET# | GETKEY | GO64 | GOSUB | GOTO | GRAPHIC | GSHAPE | HEADER | HELP | HEX$ | IF | INPUT | INPUT# | INSTR | INT | JOY | KEY | LEFT$ | LEN | LET | LIST | LOAD | LOCATE | LOG | LOOP | MID$ | MONITOR | MOVSPR | NEW | NEXT | NOT | (OFF) | ON | OPEN | OR | PAINT | PEEK | PEN | (PI) | PLAY | POINTER | POKE | POS | POT | PRINT | PRINT USING | PRINT# | PUDEF | (QUIT) | RCLR | RDOT | READ | RECORD | REM | RENAME | RENUMBER | RESTORE | RESUME | RETURN | RGR | RIGHT$ | RND | RREG | RSPCOLOR | RSPPOS | RSPRITE | RUN | RWINDOW | SAVE | SCALE | SCNCLR | SCRATCH | SGN | SIN | SLEEP | SLOW | SOUND | SPC( | SPRCOLOR | SPRDEF | SPRITE | SPRSAV | SQR | SSHAPE | ST | STASH | STEP | STOP | STR$ | SWAP | SYS | TAB( | TAN | TEMPO | THEN | TI | TI$ | TO | TRAP | TROFF | TRON | USR | VAL | VERIFY | VOL | WAIT | WHILE | WINDOW | WIDTH | XOR