Search Results

Showing results 1 to 9 of 9
Search took 0.02 seconds.
Search: Posts Made By: mathematician
Forum: Assembly Sep 15th, 2009
Replies: 22
Views: 970
Posted By mathematician
He says that he can print the first character. I suppose it is possible that the direction flag is set when the boot sector gets control, so instead of pointing to the e after the H has been printed,...
Forum: Assembly Sep 14th, 2009
Replies: 22
Views: 970
Posted By mathematician
I was using the syntax used by C and some assemblers.




In the case of a boot sector cs=0 and ip=7c00h (always).
Forum: Assembly Sep 14th, 2009
Replies: 22
Views: 970
Posted By mathematician
Since I use MASM it recognises 7c00h, but if I used NASM it would recognise 0x7c00.
Forum: Assembly Sep 14th, 2009
Replies: 22
Views: 970
Posted By mathematician
I'm not clobbering anything. The boot sector always gets loaded at an absolute address of 7c00h, which means that the ds register must contain zero if the code is org'd at 7c00h.
Forum: Assembly Sep 14th, 2009
Replies: 22
Views: 970
Posted By mathematician
org 0x7c00

cli ;disable hardware interrupts
cld ;clear direction flag
xor ax,ax ...
Forum: Assembly Sep 13th, 2009
Replies: 22
Views: 970
Posted By mathematician
You could try initialising the ds register with a value of zero. It might be a good idea to set up a stack as well.


cli
xor ax,ax
mov ds,ax
mov ss,ax
mov sp, 0x7c00
Forum: C Jun 27th, 2009
Replies: 11
Views: 633
Posted By mathematician
Well firstly, unless it is compiler specific, I have never seen %i before. A decimal integer is usually %d.

Secondly, given what you are doing, you presumably want the user to enter a positive...
Forum: C Jun 27th, 2009
Replies: 11
Views: 633
Posted By mathematician
#include <stdio.h>
#include <stdlib.h>

int main()
{
int number;
int sum;
int i;

printf("please enter the end number : \n" );
Forum: Assembly Jun 8th, 2007
Replies: 4
Views: 2,848
Posted By mathematician
I tried typing it in to debug, and it worked ok for me.
Showing results 1 to 9 of 9

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC