Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12171

MASM Fatal error: unmatched blocked nesting : DELETE

$
0
0

I am trying to find why is my code in assembly not compiling. I am a beginner in this language and I don't seem to know the problem. I tried changing the DELETE variable into DELETESG but the same problem occurs. Any help would be helpful.

DELETE SEGMENTassume cs:DELETE, ds:DELETE, ss:DELETEorg 0100h.model small.stack 100h.DATA    filename db 'FILE1.txt', 0    success_msg db 'File deleted successfully', 0DH, 0Ah, '$'    error_msg db 'File deletion unsuccessful', 0DH, 0Ah, '$'.CODEStart:    mov ax, @DATA    mov ds, ax; Call DOS function to delete filemov ah, 41hlea dx, filenameint 21h; Check for errorjc error; Display success messagemov ah, 09hlea dx, success_msgint 21hjmp exiterror:    ; Display error message    mov ah, 09h    lea dx, error_msg    int 21hexit:     mov ah, 4Ch    int 21hDELETE ENDSEND Start

Viewing all articles
Browse latest Browse all 12171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>