flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
baldr 07 Mar 2010, 20:02
MeshNix,
It's simple: when you stop asking yourself such questions. ![]() |
|||
![]() |
|
edfed 07 Mar 2010, 20:49
and i can say more:
when you can answer to advanced questions. one thing is sure, you SHOULD code A LOT to become an advanced programmer |
|||
![]() |
|
adroit 09 Mar 2010, 21:09
Thanks guys, I think i've got a grip of the concept
|
|||
![]() |
|
edfed 12 Mar 2010, 17:05
cool, welcome to code addicts.
![]() |
|||
![]() |
|
adroit 17 Mar 2010, 20:47
Thanks Guys
|
|||
![]() |
|
adroit 04 Nov 2010, 03:32
OLD POST
Ok guys, I'm back again with the same question, but this time, a little less vague. I would like to know how to do a screen delay? Meaning, the program waiting for a given time before continuing onto the next instruction. For example: algorithm: 1. print "Please wait for 5 seconds..." 2. call delay(5000) ; do delay for 5000 microseconds 3. print "Thank you. The 5 seconds have passed." I want to know how to do something like that. (Thank in advance) |
|||
![]() |
|
baldr 04 Nov 2010, 09:17
MeshNix,
For a simple solution you may wait for 5*18.2 timer ticks to pass using 0:46Ch in BIOS data area. RTC can be used too (ports 70h/71h). There is int 15h/86h BIOS service. |
|||
![]() |
|
Picnic 05 Nov 2010, 08:12
Quick & dirty solution with this old gem.
Notice that both this and baldr's suggestion won't work on XP. Code: mov cx, 18 ; 1-second delay hlt loop $-1 |
|||
![]() |
|
baldr 05 Nov 2010, 08:46
Picnic,
You should mask all IRQs except IRQ0 for this to work as expected. "Work on XP" — did you mean "in NTVDM"? It works there. |
|||
![]() |
|
Picnic 05 Nov 2010, 08:59
I think that Windows XP does not support this interrupt 15h/86h.
|
|||
![]() |
|
adroit 08 Nov 2010, 00:32
Unfortunately, I use XP.
I cannot recall properly, but I saw someone using a code similar to this, to delay the computer: Code: mov ax,0 mov cx,65365 .loop: mov [es:di],ax loop .loop [Don't quote me on this] |
|||
![]() |
|
revolution 08 Nov 2010, 01:50
MeshNix wrote: [Don't quote me on this] ![]() |
|||
![]() |
|
bitRAKE 08 Nov 2010, 04:10
http://ip-tietgennet.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/index.htm#2C
DOS Services INT 21, AH=2C Should work from dosbox on WinXP. Get time, add delay, and wait for projected time. |
|||
![]() |
|
rugxulo 08 Nov 2010, 15:07
Sorry guys, been preoccupied these past few days, kept forgetting to post this, hope it helps:
Code: ; wait_for_me wait_for_me: push cx ; CX = seconds to wait (max. 59) call scroll ; only scroll if at screen bottom mov si,offset pauze_msg call getlen ; mov bp,si ; add bp,ax ; dec bp ; dec bp xchg ax,bx lea bp,[si+bx-2] ; saves two bytes test word ptr [suboptions],(SUBOPT_H or SUBOPT_Y) jnz wait_for_me_no_msg cmp byte ptr [scroll_status],1 ; if scrolled, don't print CR+LF jz wait_for_me_no_crlf call print_crlf2 ; (non-redirectable) wait_for_me_no_crlf: call print2 ; (non-redirectable) wait_for_me_no_msg: pop cx cmp cl,60 ; jnb wait_for_me_goto_end ; (won't fit w/ some asms) jb wait_for_me_here jmp wait_for_me_ret ; cheesy workaround |
|||
![]() |
|
adroit 10 Nov 2010, 01:41
lol
![]() ![]() bitRake, I'll see what I can do rugxolu, i've got to analyze this code ...ill be back |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.