0
dseg segment FileName db "hex.txt$" dseg ends cseg seg.. ... wrFile proc push ax bx cx dx mov ax,3D00h mov dx, offset fileName int 21h mov bx,ax mov cx,10*type scores mov dx,offset highscoresnum mov ah,40h int 21h mov dx,offset highscoresdate mov ah,40h int 21h mov ah,3eh int 21h pop dx cx bx ax ret wrFile endp 

at the first int 21h (ah=3dH) CF is not cleared and AX turns to 2h. in the net it's written that AX holds the error code, but i couldn't find it. what do i do wrong?

3
  • push ax bx cx dx? What assembler are you using for that? Commented Sep 30, 2010 at 23:30
  • 8086,that's what they teach us at school Commented Sep 30, 2010 at 23:59
  • 1
    eden, I understand the mnemonics, I've just never seen an assembler that lets you push or pop more than one register at a time. That's not doable in standard x86 so I'm assuming the assembler itself is turning that into push ax ; push bx ; ... which is a nice feature. Hence my question - I wanted to look into the actual assembler product. Commented Oct 1, 2010 at 0:27

1 Answer 1

2

I think you're getting a "file not found" error, because the INT 21h functions that use file or path names generally require them to be terminated with a zero byte, not a '$'.

Sign up to request clarification or add additional context in comments.

1 Comment

Correct. According to this: ctyme.com/intr/rb-2779.htm it's an ASCIZ string, so it's zero terminated.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.