GIDForums  

Go Back   GIDForums > Computer Programming Forums > Assembly Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 13-May-2008, 22:52
chezzestix chezzestix is offline
New Member
 
Join Date: May 2008
Posts: 1
chezzestix is on a distinguished road

clock troubles


I've been having trouble with this code so I started placing some custom break points in the code*1 until I found the point at which the program would keil over. I put one break point before the "div bh" in the bcd2ascii function and one after and the computer locks up before the second one is reached.

Whats wrong with my div command?

*1
Code:
mov ah,0 int 16h mov ah,0Eh int 10h



Code:
Code:
cli xor ax,ax mov es,ax mov fs,ax mov gs,ax mov ds,ax mov ss,ax mov sp,0x7C00 sti start: mov dx,0 mov si,0 mov di,0 call gettime call strtime mov ecx,3 loop0: call bcd2ascii loop loop0 mov bh,0 call asciiout call colonout call asciiout call colonout call asciiout call crout jmp start gettime: mov ah,02h int 1Ah ret strtime: mov [si],ch add si,8h mov [si],cl add si,8h mov [si],dh add si,8h ret bcd2ascii: mov bh,0Ah mov ax,[di] mov dx,0 div bh add al,30h add ah,30h mov [si],al add si,8h mov [si],ah add si,8h add di,8h ret asciiout: mov al,[di] mov ah,0Eh int 10h add di,8h mov al,[di] mov ah,0Eh int 10h add di,8h ret colonout: mov al,3Ah mov ah,0Eh int 10h ret crout: mov al,0Dh mov ah,0Eh int 10h ret TIMES 510-($-$$) DB 0x00 SIGNATURE DW 0xAA55
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying signals internal to the architecture part of an entity aijazbaig1 Miscellaneous Programming Forum 7 04-Sep-2006 08:11
Click Ticks dayrinni C Programming Language 1 20-Feb-2006 11:50
logical clock or counters Krandygrl00 CPP / C++ Forum 1 13-Oct-2005 04:32
FLTK clock box widget cable_guy_67 FLTK Forum 0 09-Jul-2005 18:51
Computer Clock Problem kselin Computer Hardware Forum 7 21-Jun-2005 08:26

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:01.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.