1 / 6

Makrodefinīcijas

Makrodefinīcijas. B ir apakšprogramma. B ir makrodefinīcija. A. A. B. B. C. C. B. D. D. Lai A, B, C, D ir koda bloki. Ir darbību secība: A, B , C, B , D. Makrodefinīcijas citā failā :. include macro_21.mac. Elementāra makrodefinīcija:. Null Macro Nop EndM.

max
Download Presentation

Makrodefinīcijas

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Makrodefinīcijas B ir apakšprogramma B ir makrodefinīcija A A B B C C B D D Lai A, B, C, D ir koda bloki. Ir darbību secība: A, B, C, B, D.

  2. Makrodefinīcijas citā failā: include macro_21.mac Elementāra makrodefinīcija: Null Macro Nop EndM Programmas fragments: Null Null Izpildāmā faila fragments:

  3. Makrodefinīcijuizmantošana programmā: Jmp Short Start Message Db "Hello, User !$" Start: Cls GoToXY 0, 2 PutString Message GoToXY 0, 3 MultiChar '*', 7 MultiChar '*', 7 GoToXY 0, 4 PutString Message

  4. Makrodefinīcijas ar parametru deklarēšana: PutString Macro String ... EndM Makrodefinīcijas ar parametru piemērs: PutString Macro String Push Ax Push Dx Lea Dx, String;izvadāmā teksta rinda Mov Ah, 9 Int 21h Pop Dx Pop Ax EndM

  5. Makrodefinīcija ar iezīmēm: MultiChar Macro Char, Counter Local NextChar Push Ax Cx Dx Mov Ah, 2 Mov Dl, Char;izvadāmais simbols Mov Cx, Counter;simbolu daudzums NextChar: Int 21h Loop NextChar Pop Dx Cx Ax EndM

  6. Makrodefinīciju ar Local iezīmēm var izmantot vairākas reizes: MultiChar '*', 7 MultiChar '*', 7 Iezīmju saraksts: Local LabelA, LabelB Nepareizi (ir tukša rinda starp Macro un Local): MultiChar Macro Char, Counter Local NextChar Lai makrodefinīcijā ar iezīmēm nav direktīvas Local:

More Related