| 函數 | 原型 | 功能 | 頭文件 |
|---|---|---|---|
| atof | double atof(const char *s) | 字符串→double | math.h, stdlib.h |
| atoi | int atoi(const char *s) | 字符串→int,出錯返 0 | stdlib.h |
| atol | long atol(const char *s) | 字符串→long,出錯返 0 | stdlib.h |
| 函數 | 原型 | 說明 |
|---|---|---|
| absread | int absread(int drive, int nsecs, int lsec, void *buf) | 讀扇區,drive 0=A 盤,1=B 盤,成功返 0 |
| abswrite | int abswrite(int drive, int nsecs, int lsec, void *buf) | 寫扇區,繞過文件系統直接操作磁盤 |
頭文件:dos.h,調用 DOS 中斷 0x25/0x26。
char biosdisk(int cmd, int drive, int head, int track, int sector, int nsecs, void *buffer);
頭文件:bios.h,中斷 0x13 直接操作硬件。
int bdos(int func, unsigned dx, unsigned al);
DOS INT 21H 系統調用封裝,返回 AX 值。
bcd bcd(int x); bcd bcd(double x); bcd bcd(double x, int decimals);
精度達 17 位,decimals 指定小數位。頭文件 bcd.h。