Forum: Assembly Sep 15th, 2009 |
| Replies: 22 Views: 970 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 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 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 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 org 0x7c00
cli ;disable hardware interrupts
cld ;clear direction flag
xor ax,ax ... |
Forum: Assembly Sep 13th, 2009 |
| Replies: 22 Views: 970 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 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 #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 I tried typing it in to debug, and it worked ok for me. |