cypress怎么样:dos中有一个命令dir,谁能提供它的c源代码

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 23:56:57
用c实现dir的功能也可以

MS-DOS 6.0 的源代码,汇编的。
dir.asm 。3764行(算最后的两个空行)

如果想看就向我要。

下面是开头几行注释:

page ,132
title DIR Internal Command
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */

;*** DIR.ASM - DIR internal command

comment % =================================================================

This module replaces TCMD1A.ASM. The old module was titled
"PART4 COMMAND Transient routines".

From residual documentation, I surmise that TCMD.ASM originally
contained the internal commands DIR, PAUSE, ERASE, TYPE, VOL, and
VER. The file seems to have been successively split:

TCMD -> TCMD1,TCMD2 -> TCMD1A,TCMD1B,TCMD2A,TCMD2B

TCMD1A.ASM contained only the DIR command.

我只有PAS的源代码

……DOS 不是 C 语言编的,DOS 是汇编语言编的。

DOS命令都是用汇编写的。
现在高级语言编程中,有现成的函数供你去遍历所有目录文件的。
就算用汇编或是C在DOS写,也不是很难的。。。去查查相于驱动器控件和文件方面的中断或函数