| Assembler "in-line" (:asm subroutine) | If errorlevel 1 echo Error in assembly & goto :EOF ![]() Rem Previous ":" line mark the end of the assembly source code Mov ah, TERMINATE_PROGRAM AH = DOS function Lea bx, text2 BX -> text2 (using LEA instead of OFFSET) Display a string given its length via DOS function 2 and a loop Display a string terminated in "$" using DOS function 9 TEXT2_LEN EQU $-text2 length of previous string Rem (TO DO: change this method by a macro with one parameter )Ĭall :asm & goto : Rem "call :asm" line as shown below the assembly source code starts at next line com file preceded by colon must appear after "goto" in Rem The definition of the following variable activate the creation of listing. ![]() Rem BatchAsm.bat: Limited version of a x86 16-bits "in-line" assembler written in Batch
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |