flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly
Code: org 100h ;DOS 1+ - GET SYSTEM TIME ; ;AH = 2Ch ; ;Return: ;CH = hour CL = minute DH = second DL = 1/100 seconds mov ah, 2ch ; You was setting AL instead of AH here, so you was calling an unspecified function here int 21h ;DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT ;AH = 02h ;DL = character to write ; BUT, we have to convert the number to ASCII first mov al, dl mov ah, 0 mov cl, 10 div cl mov dh, ah mov dl, al add dl, '0' mov ah, 2 int 21h mov dl, dh add dl, '0' mov ah, 2 int $21 ;KEYBOARD - GET KEYSTROKE ; ;AH = 00h ; ;Return: ;AH = BIOS scan code AL = ASCII character xor ax, ax int $16 ; Just halting execution until some key is pressed. mov ax,4C00h int 21h |
|||
![]() |
|
baldr
LocoDelAssembly wrote: ; You was setting AL instead of AH here, so you was calling an unspecified function here ![]() |
|||
![]() |
|
dreamer85
jeez i have such a long way to go
![]() thx guys. |
|||
![]() |
|
DOS386
dreamer85 wrote: erm the idea is to get the seconds from 0..99 Timing code (32-bit DOS) : http://board.flatassembler.net/topic.php?t=8670 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.