CodeNet / Языки программирования / Ассемблер / Пишем "многозадачную" ОС в "Real Mode"
CodeNet / Платформы / Пишем ОС / Пишем "многозадачную" ОС в "Real Mode"
CodeNet / Платформы / Пишем ОС / Пишем "многозадачную" ОС в "Real Mode"
Модуль data.inc
ctable DB "!",0,"......Quit - only for debuging",0 DW doQuit DB "HELP",0,"...Show this help screen",0 DW doHelp DB "CLS",0,"....Clear screen",0 DW doCLS DB "DIR",0,"....Show curent directory",0 DW doDir DB "CD",0,".....Change curent directory",0 DW doCD DB "CURDIR",0,".Show curent directory",0 DW doCDir DB "START",0,"..Start new task: START",0 DW doStart DB "KILL",0,"...Unload task: KILL ",0 DW doKill DB "STOP",0,"...Stop task",0 DW doStop DB "RESTART",0,"Restart task",0 DW doReStart DB "PRIOR",0,"..Set task prioritet",0 DW doSetPrioritet DB "LIST",0,"...Tasks list",0 DW doList DB "RUN",0,"....Run program",0 DW doRun DB 0 numtask DB ? tasknum DB ? Root DW 2 RootSect DW 19 dos_CurDir DB "A:\",0,255 DUP(?) tmp_String DB 255 DUP (?) ; Структура записи в каталоге ################################################ dos_FileName DB 8 DUP (?) dos_Ext DB 3 DUP (?) dos_Attr DB ? dos_Reserved DB 10 DUP (?) dos_Time DW ? dos_Date DW ? dos_ClustNo DW ? dos_SizeL DW ? dos_SizeH DW ? ; Структура для FindFirst и FindNext ######################################### find_FileName DB 8 DUP (?) find_Ext DB 3 DUP (?) find_Attr DB ? find_Reserved DB 10 DUP (?) find_Time DW ? find_Date DW ? find_ClustNo DW ? find_SizeL DW ? find_SizeH DW ? find_inSect DW ? ; Сектор find_inPos DW ? ; Позиция в секторе ; Дискрипторы задач ########################################################## ;¬ typedef struct ttask { firsttask DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } tasks DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task2 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task3 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task4 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task5 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task6 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task7 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; } task8 DB ? ;¦ char id; (255 - no task) DD ? ;¦ void far * pointer; DW 255 DUP(?) ;- unsigned int stack[255]; }