          6809 - TO 68K SK*DOS ADDRESS CONVERSION TABLE

1. User data area (accessed relative to A6)

   6809                68K
-------------     --------------

TTYBS   $CC00     BACKSC    736       Backspace character ($08)
                  BAUDRT    3329      Baud rate for serial ports (/100)
ESCRET  $CC16     BREAKA    762       Break (Escape) address (long word)
TTYBE   $CC07     BSECHO    743       Backspace echo ($08)
SYSDAY  $CC0F     CDAY      751       Current date - day
CMDFLG  $CC28     CMFLAG    793       Command flag
SYSMTH  $CC0E     CMONTH    750       Current date - month
UCMDTB  $CC12     COMTAB    754       Pointer to command table (long word)
CURCHR  $CC18     CURRCH    766       Last character read from buffer
SYSYR   $CC10     CYEAR     752       Current date - year
TTYDEL  $CC01     DELETC    737       Delete character ($18)
CURLIN  $CC1A     LINCTR    3327      Line-on-page counter (for pause)
                  DEVIN     3274      Current input device number (0)
                  DEVOUT    3275      Current output device number (0)
                  DEVERR    3276      Current error device number (1)
                  DEVTAB    3278      I/O device table (640 bytes)
                  DOSORG    838       Absolute ORG address of SK*DOS
FILEKO  $CC2F     ECHOFL    800       Input echo flag
TTYEOL  $CC02     ENDLNC    738       End of line character ($3A)
                  EOFILC    3330      End-of-file character ($1A)
ERRTYP  $CC20     ERRTYP    782       Error type
TTYESC  $CC0A     ESCAPC    746       Escape char ($1B)
XFERAD  $CC1E     EXECAD    776       ML execution address (long word)
XFERFG  $CC1D     EXECFL    774       Execution address flag
INFIL   $CC26     FIADDR    788       File input address vector (long word)
                  FNCASE    801       File Name case flag
OUTFIL  $CC24     FOADDR    784       File output address vector (long word)
LSTTRM  $CC11     LASTRM    753       Last terminator
LINBUF  $C080     LINBUF    608       Line buffer (128 bytes)
LINPTR  $CC14     LPOINT    758       Pointer to line buffer (long word)
                  MAXDRV    802       Maximum drive number
MEMEND  $CC2B     MEMEND    796       Last usable memory address (long word)
TTYNL   $CC05     NULLWT    3324      Null wait constant
                  OCOLUM    3328      Current output column
LDROFF  $CC1B     OFFSET    770       Offset load address (long word)
TTYPS   $CC09     PAUSEB    3326      Output pause control byte
TTYDP   $CC03     PLINES    3322      Number of printed lines per page
PRVCHR  $CC19     PREVCH    767       Previous character read
TTYWD   $CC04     PWIDTH    3323      Page column width
                  REPEAC    749       Repeat character ($01)
                  SEQNUM    806       Sequence number
TTYEJ   $CC08     SLINES    3325      Number of skipped lines between pages
SPECIO  $CC21     SPECIO    792       Special I/O Indicator
SYSDRV  $CC0B     SYSTDR    747       System default drive
TTYTB   $CC06     TTAB      742       Tab (not currently used)
SYSFCB  $C840     USRFCB    0         User FCB (608 bytes)
WRKDRV  $CC0C     WORKDR    748       Working default drive
                  XOFFC     3331      X-OFF character (0)
                  XONC      3332      X-ON character (0)

2. Non-disk functions (accessed with DC ......)

   6809                68K
-------------     --------------

CLASS   $CD21     CLASFY    $A02E     Classify alphanumeric characters
INDEC   $CD48     DECIN     $A030     Input decimal number
SETEXT  $CD33     DEFEXT    $A024     Default extension
                  DIREST    $A026     Floppy disk restore
                  DISEEK    $A027     Floppy disk seek
DOCMND  $CD4B     EXECSD    $A01F     Execute a SK*DOS command
                  FINDEV    $A012     Find device number from device name
GETCHR  $CD15     GETCH     $A029     Get input character with echo (7 bits)
                  GETDNT    $A03F     Get date (D5) and time (D6)
GETFIL  $CD2D     GETNAM    $A023     Get file name into FCB
NXTCH   $CD27     GETNXT    $A02D     Get next character from buffer
GETHEX  $CD42     HEXIN     $A02F     Input hexadecimal number
INBUFF  $CD1B     INLINE    $A02C     Input into line buffer
                  INNOEC    $A02A     Get input character without echo (8 bits)
                  INTDIS    $A040     Disable interrupts
                  INTENA    $A041     Re-enable interrupts to previous status
LOAD    $CD30     LOADML    $A022     Load open machine language file
                  OSTATS    $A03D     Check output port status
                  OUT10D    $A039     Output 5 decimal digits
OUTHEX  $CD3C     OUT2H     $A03A     Output 2 hex digits
OUTADR  $CD45     OUT4H     $A03B     Output 4 hex digits
OUTDEC  $CD39     OUT5D     $A038     Output 5 decimal digits
                  OUT8H     $A03C     Output 8 hex digits
PCRLF   $CD24     PCRLF     $A034     Print CR/LF
RPTERR  $CD3F     PERROR    $A037     Print error code
                  PNSTRN    $A036     Print string (Without CR/LF)
                  SEENXT    $A03E     See (preview) next character in buffer
PSTRNG  $CD1E     PSTRNG    $A035     Print CR/LF and string
PUTCHR  $CD18     PUTCH     $A033     Output character
RENTER  $CD06     RENTER    $A025     Re-enter SK*DOS
RSTRIO  $CD2A     RESIO     $A020     Reset I/O pointers
                  RESTRP    $A021     Reset trap vectors
STAT    $CD4E     STATUS    $A02B     Check keyboard for character (and number)
                  TOUPPR    $A031     Convert lower case IN D5 to upper
                  VPOINT    $A000     Point to SK*DOS variable area
WARMS   $CD03     WARMST    $A01E     Warm start
        
3. Disk functions (accessed with DC ......)

   6809                68K
-------------     --------------

                  DIROPN    $A00B     Open directory file
                  DSREAD    $A00D     Read directory or system information sector
                  DSWRIT    $A00E     Write directory or SIS entry
                  FCLOSE    $A008     Close file
FMSCLS  $D403     FCSCLS    $A009     Close all open files
FMSINT  $D400     FCSINI    $A01B     Initialize File Control System
                  FDELET    $A00F     Delete a file
                  FDRIVE    $A01A     Find next drive number
                  FOPENR    $A005     Open a file for read
                  FOPENU    $A007     Open a file for update
                  FOPENW    $A006     Open a file for write
                  FRBACK    $A015     Backup to previous sector
                  FREAD     $A001     Read the next byte from file
                  FRENAM    $A010     Rename a file
                  FREWIN    $A00A     Rewind file
                  FRGET     $A016     Read a random byte
                  FRPUT     $A017     Write a random byte
                  FRRECD    $A014     Select a specified random sector
                  FSKIP     $A011     Skip current sector
                  FWRITE    $A002     Write the next byte to the file
                  SISOPN    $A00C     Open system information sector
                  SREAD     $A01C     Read a single sector
                  SWRITE    $A01D     Write a single sector

4. File Control Block Equates

   6809                68K
-------------     --------------

FCBFUN  0                             Function code
FCBERR  1         FCBERR    1         Error code
FCBRW   2         FCBRW     2         Read=1 write=2 update=3 or $83
FCBDRV  3         FCBDRV    3         Logical Drive number
FCBNAM  4         FCBNAM    4         File name (8 chars)
FCBEXT  12        FCBEXT    12        Extension (3 chars)
FCBATT  15        FCBATT    15        File attributes (bits 4-7)
FCBFTR  17        FCBFTR    18        First track of file
FCBFSE  18        FCBFSE    19        First sector of fileFIRST SECTOR OF FILE
FCBLTR  19        FCBLTR    22        Last track of file
FCBLSE  20        FCBLSE    23        Last sector of file
FCBSIZ  21        FCBSIZ    24        File size in sectors (2 bytes)
FCBRAN  23        FCBRAN    26        Random indicator (0=seq)
FCBTIM  24        FCBTIM    27        Time or Sequence No.
FCBMON  25        FCBMON    28        Month
FCBDAY  26        FCBDAY    29        Date of file creation or update
FCBYR   27        FCBYR     30        Year
FCBCTR  30        FCBCTR    34        Current track in buffer
FCBCSE  31        FCBCSE    35        Current sector in buffer
FCBNMB  36        FCBNMB    36        Temp name buffer (11 chars w. ext)
FCBDPT  34        FCBDPT    49        Data pointer to next byte (4-255)
FCBRIN  35        FCBRIN    51        Random file index pointer
FCBNMS  53        FCBNMS    52        2nd name buffer (11 chars w. ext)
FCBSCF  59        FCBSCF    59        Space compr. flag (0=compr;FF=no)
FCBSPT  60        FCBSPT    60        Sectors per track for random
FCBUPD  63        FCBUPD    61        Random update flag
                  FCBTMP    62        Temp storage for random
FCBLST  28        FCBLST    68        Pointer to next open FCB
                  FCBPHY    72        Physical drive number
FCBDIT  47        FCBDIT    74        Directory track
FCBDIS  48        FCBDIS    75        Directory sector
FCBDIB  49        FCBDIB    77        Directory starting byte index
FCBCRN  32        FCBCRN    78        Current record number (2 bytes)
FCBDAT  64        FCBDAT    96        Beginning of data buffer (512 bytes)

5. 6809 locations which have no 68K equivalent

   6809           Comments
-------------   -----------

OUTSW   $CC22
INSW    $CC23
CURCLM  $CC29
ERRVEC  $CC2D
CPUTYP  $CC33
PRTADR  $CC35
PRTLNG  $CC37
PRTDVC  $CC39
PINIT   $CCC0
PCHK    $CCD8
POUT    $CCE4
COLDS   $CD00   $1000 in most systems
INCH    $CD09
INCH2   $CD0C
OUTCH   $CD0F
OUTCH2  $CD12
ADDBX   $CD36
FMS     $D406   Broken down into separate calls
BASFCB  $D409
CURFCB  $D40B
VRFYFG  $D435
