《学生成绩管理系统开发教程.docx》由会员分享,可在线阅读,更多相关《学生成绩管理系统开发教程.docx(39页珍藏版)》请在第一文库网上搜索。
1、;=学生成绩管理系统=;*;EQUSTATEMENTSGOHEREStructNodeequ32:体现式赋值微操作equpage133NodenameequO;类似defineNode_numequ12NOdeJnathSequ18Node_eng1ishequ20Node_chineseequ22Node_othersequ24Node_tota1equ26Node_avgequ28Node_nextequ30max_recordequ100raax_menu_indexequ9;*产*data-segsegment;definedatasegment;DATAGOESHEREbuf1DB3
2、0buf1S1enDB?buf1dataDB30bufnameDBbufnames1enDBbufnamedataDBbufgetintDB32bufgetint_s1enbufgetintdatadup(?)20?20dup(?)DB?DB32dup(?)str_menuDBOdH,OaH,=,OdH,OaH,OdH,OaHDB,1)ddRecord1,OdH,0aH,OdH,OaHDB,2)Print1,OdH,0aH,OdH,OaHDB,3)Save,OdH,0aH,OdH,OaHDB,4)0pen,OdH,0aH,OdHt0aH,OdH,DB,5)Find*,OdHt0aH,OdH,O
3、aH,OdH,=Studentmarkssystem=DB6)De1ete,OdH,OaH,OdH,OaH,DB0)Exit,OdH,OaHDBChoiceSOaHOaH,OaH;ErrorStringsstr_error_1DB,Errorinput!,OdH,OaH,$jump_tbDWcase_0DWcase.DWcase_2DWcase3DWcase4DWcase5DWcase6headDW?info_0dbinfo_1dbinfo_2dbinfo_3dbinfo_4info_5db;表头指针,inputnum:,$,inputmath/,$,inputeng1ish:,$inputC
4、hinese:,$db,inputothers:,inputname:*,$str_tb_headdbNum,9,Name,9,Maths,9,Eng1ish*,9,Chinese,9,Others*,9,Tota1*,9,vg,OdH,OaHdb=OdH,OaH/$str_tabdb9,$rdatadb(StructNode*(max_record+D)dup(?);所有结点*(100+1)rdata_pdwrdata;下一种可用结点rcountdw00H;目前已分派的结点数newnodedw?pnodedw9fi1e_namedbcAstudent.txt,OOHfi1eerror1db,
5、Fai1edcreatefi1e.,ODH,OAH,$fi1eerror2db,Fai1edwritefi1e.ODH,OAH,$fi1eerror3dbFai1edopenthefi1e.*,ODH,OAH1$fi1e_error4db,Fai1edreadfi1e./,ODH,OH,fi1einfo1db,savingthefi1e.,ODH1O1I,$db,Writetofi1esuccessfu11y!,ODH,OAH,fi1einfo3dbopeningthefi1e./,ODHfOAH,$fi1einfo4db,readthefi1esuccessfu11y!*,ODH,OAH,$
6、fp1dw?;文献指针datasegends;*;*extdata_segsegment;defineextradatasegment;EXTRADATAGOESHEREex1da1a_segends;*;*StaCk_segsegmentstack;defineextradatasegment;STACKDATAGOESHEREDBIOOHdup(?)stack_segends;*;*programsegment;definecodesegment;*mainprocfar;mainpartofprogramassumecs:program,ds:dataseg,es:extdataseg,
7、ss:stacksegstart::setupstackforreturnpushdssubax,axpushax;setDSregistertocurrentdatasegmentmovaxtdataseg;datasegsegmentaddrmovds,ax;intoDSregistermovax,extdataseg;extdatasegsegmentaddrmoves,ax;intoESregistermovax,stackseg;StaCk_segsegmentaddrmovss,ax;intoSSregister;MAINPARTOFPROGRAMGOESHERE;分派链表头结点m
8、ovax,rdatapmovhead,ax;目前头指针就是rdataaddrdatap,StructNodemovbx1headmovwordptrbx+Nodenext,OOH1b_print_menu:;打印菜单1eadx,str_menumovah,09Hint21Hca11farptrgetintcmpdx,max_menu_indexja1b_print_menumovdi,dxsh1di,1jmpjump_tbdijmpIbprintmenucaseO:;Exitretcase1:;添加记录ca11farptracidrecordjmpIbprintmenuCaSe_2:;打印所有
9、记录ca11farptrprintrecordjmpIbprintmenucase_3:;保留到文献ca11farptrsave_recordjmp1b_print_menucase_4:;从文献中读取ca11farptrread_recordjmp1b_print_menucase_5:;查找ca11farptrfindrecordjmpIbprintmenucase6:;删除ca11farptrde1eterecordjmp1b_print_menuret!returntoDOSmainendp:endofmainpartofprogram;*;*sub1procnear;definesubprocedurepushaxpushbxpushexpushdx;mainportofsubprocedure:exitsubprocedurepopdxpopexpopbxpopaxretsub1endp;endofsubprocedure;*;*;printCR1Fcr1fprocfarpushdxpushaxmovd1,OdHmovah,02Hint21Hmovd1,OaHmovah,02Hint21hpopaxpopdxretcr1fendp;*