Here’s a code snippet done using Assembly Programming (A86) language that tells the local system time (ms-dos) if it’s under AM or PM. This is simple code that you want to try to explore assembly language. If you need the compiler, please leave message below and I will send it to you. Thanks!
[code lang="asm"]
mov ah, 2ch
int 21h
mov al, ch
cmp al, 12
jb exit1
cmp al, 12
jae exit2
exit1:
mov ah, 09
lea dx, result1
int 21h
int 20h
exit2:
mov ah, 09
lea dx, result2
int 21h
int 20h
result1 db 'The current time falls under AM.$'
result2 db 'The current time falls under PM.$'
[/code]
Tags: A86, assembly, Assembly Programming


