I am attempting to try to get the system date for my PC with the DOS function AH = 2A. As you can see from the picture below, I'm having a bit of an issue getting DH, DL and AL. CX comes up when I run it and I'm able to get the year 2017.
Asked
Active
Viewed 286 times
-2
-
2I don't think `int 21` has been executed yet, that picture tells us nothing. What's in `DX` **after** it has executed? – Jester Jan 30 '17 at 01:04
-
well, I added int 21 on line 102 to run. but it looks like it gets to line 102 and halts. – DrSoloX Jan 30 '17 at 01:14
-
2`p` executes a loop, a repeated string instruction, a software interrupt, or a subroutine. So after assembling the 2 instructions, `p` executed the `mov ah, 2a` and showed the register dump. the last line is the instruction ready to be executed next, not the last instruction executed. Do another `p` to do the `int 21` – Michael Petch Jan 30 '17 at 01:41
1 Answers
1
Can you give more detail about what the problem is. I tried your little program and it worked for me: CX=07E1 (2017), DX=011D (Jan 29), AL=0 (Sun). Did you actually execute the int 21? In your dosbox it looks like you stopped before it even executed.

Rob Gardner
- 201
- 1
- 4
-
-
-
no he didn't. the INT 21 debug shows is the NEXT instruction, so DX/CX shown is the values before the call – Tommylee2k Jan 30 '17 at 17:02