Forum: Assembly 12 Days Ago |
| Replies: 2 Views: 353 Old time compilers use si and di to store register variables, so they are routinely saved on the stack. It looks to me as if si is being pushed a second time because it is being passed as an argument... |
Forum: Assembly 16 Days Ago |
| Replies: 2 Views: 307 That is the kind of thing an operating system would do at boot time; I am not sure how a normal application program would do it. An OS would probably do it either by looking at the ACPI tables or... |
Forum: Assembly 19 Days Ago |
| Replies: 1 Views: 384 int 28h is called from within DOS, so the indos byte will always be greater than 0 when it is called. You should check that it is not greater than one.
Also, it was normal to hook int 8 as well as... |
Forum: Assembly 29 Days Ago |
| Replies: 13 Views: 907 Well assuming that you are running a protected mode operating system such as Windows or Linux, you can be absolutely certain that it is loaded. Your computer would collapse on the floor otherwise. |
Forum: Assembly Sep 20th, 2009 |
| Replies: 3 Views: 387 |
Forum: Assembly Sep 20th, 2009 |
| Replies: 5 Views: 353 I use masm. You can find the 32 bit version on the web, but the 64 bit version is only available as part of Visual Studio, so far as I know.. |
Forum: Assembly Sep 20th, 2009 |
| Replies: 5 Views: 349 It looks to me as if there is no colon after "start". You need a colon after a label |
Forum: Assembly Sep 15th, 2009 |
| Replies: 22 Views: 892 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: 892 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: 892 Since I use MASM it recognises 7c00h, but if I used NASM it would recognise 0x7c00. |
Forum: Assembly Sep 14th, 2009 |
| Replies: 22 Views: 892 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: 892 org 0x7c00
cli ;disable hardware interrupts
cld ;clear direction flag
xor ax,ax ... |
Forum: Assembly Sep 13th, 2009 |
| Replies: 22 Views: 892 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: Assembly Sep 12th, 2009 |
| Replies: 13 Views: 907 You cannot access the GDT from within an application. The operating system aqnd hardware, between the two of them, conspire to ensure that an application can only access the memory allocated to it.... |
Forum: Assembly Aug 7th, 2009 |
| Replies: 2 Views: 380 You can compile code with a 32 bit assembler, and it will run on 64 bit machines, but the code produced will obviously only make use of 32 bit registers. How many cores a processor has is not... |
Forum: C Jul 30th, 2009 |
| Replies: 11 Views: 563 C was originally developed for the express purpose of writing an operating system; Unix to be exact. Admittedly Unix can only be described as the work of an evil misanthropic genius. |
Forum: C Jul 29th, 2009 |
| Replies: 11 Views: 563 Most of Windows was written in C. You might or might not think that is marvellous. |
Forum: Troubleshooting Dead Machines Jul 28th, 2009 |
| Replies: 23 Views: 1,398 Not so. I have done a repair reinstall enough times without that ever happening to me. The only thing which will need to have updates reinstalled is the operating system. You can do that either by... |
Forum: Troubleshooting Dead Machines Jul 28th, 2009 |
| Replies: 23 Views: 1,398 Well if you do try it, it will first of all ask you if you want to try and repair it with "recovery console." The answer to that is probably no, unless you know what you are doing. A little later on... |
Forum: Troubleshooting Dead Machines Jul 28th, 2009 |
| Replies: 23 Views: 1,398 Because one of the first things which will happen when you begin reinstallation is that the operating system will load drivers for the mouse and keyboard from the CD. The fact that you can get into... |
Forum: Troubleshooting Dead Machines Jul 27th, 2009 |
| Replies: 23 Views: 1,398 Can you get into the BIOS? If the keyboard works there, the answer is probably that your operating system needs reinstalling. |
Forum: C Jul 21st, 2009 |
| Replies: 3 Views: 486 You write a shell the same way you write any other application program; it just happens to be the one which gets automatically loaded after the OS has finished booting. Of course it needs to be able... |
Forum: Assembly Jul 11th, 2009 |
| Replies: 4 Views: 738 push bp
mov bp,sp
..............
..............
..............
mov [bp-2], ax ;first return valuse
mov [bp-4], dx ;second return value
pop bp
ret |
Forum: Assembly Jul 9th, 2009 |
| Replies: 26 Views: 1,262 I have never heard of a ccr register, and you won't need to worry about the cr registers unless you are going to write an operating system.
I have never used a system based upon the MC6800... |
Forum: Assembly Jul 9th, 2009 |
| Replies: 26 Views: 1,262 An interrupt can occur when a hardware device sends a signal to the processors intr pin, or if software uses an int instruction. In either case, the processor uses the interrupt number as an index... |
Forum: Assembly Jul 9th, 2009 |
| Replies: 26 Views: 1,262 Datasg SEGMENT
message DB "ASSEMBLY LANGUAGE PROGRAMMING$"
Datasg ENDS
Dispsg SEGMENT
ASSUME CS:Dispsg, DS: Datasg
;ORG 100h ;you only need org 100h with .COM files,
... |
Forum: C Jun 27th, 2009 |
| Replies: 11 Views: 603 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: 603 #include <stdio.h>
#include <stdlib.h>
int main()
{
int number;
int sum;
int i;
printf("please enter the end number : \n" ); |
Forum: Assembly Jun 26th, 2009 |
| Replies: 9 Views: 1,057 I am not sure why he has decided to load his OS at 0x50000, because that location usually contains the tail end of the bios data area and a table used by the floppy disk driver.
When a PC boots it... |
Forum: Assembly Jun 26th, 2009 |
| Replies: 9 Views: 1,057 No configuration is needed before you can use int 10h to put text on the screen. Any configuration which may have been necessary will already have been done by the BIOS, which, after all, commonly... |
Forum: Assembly Jun 26th, 2009 |
| Replies: 9 Views: 1,057 He can carry on using the stack he set up in the boot sector, until after he has switched into protected mode.
One of the great joys of writing protected mode operating systems is that, once in... |
Forum: Assembly Jun 25th, 2009 |
| Replies: 9 Views: 1,057 The triple fault seems to happen when you execute the jump following the switch into protected mode. That makes me wonder whether the org 0 at the beginning of the file corresponds to where you have... |
Forum: Assembly Jun 25th, 2009 |
| Replies: 3 Views: 529 They look as though they should do the same thing. The only thing I can think of is if you have got an "assume ss" somewhere. Other than that, you could try posting a larger code fragment so that we... |
Forum: Assembly Aug 5th, 2008 |
| Replies: 10 Views: 2,653 I'm not sure I understand any of that. Ignoring macros for the moment, assembly language mnemonics are just a more readable version of machine code instructions; there is more or less a one to one... |
Forum: Assembly Jul 29th, 2008 |
| Replies: 10 Views: 2,653 Personally I would say that the only time you need assembly language in the modern world is if you are writing an operating system, anything else which is very low level, or with something which is... |
Forum: Computer Science Jan 29th, 2008 |
| Replies: 35 Views: 21,557 If you wanted something equivalent to maybe MS-DOS, and working in asm, my guess would be that you are thinking of at least two years, and perhaps 40,000 lines of code. |
Forum: Computer Science Jan 28th, 2008 |
| Replies: 35 Views: 21,557 Once you have got basic input and output from the keyboard and screen, if I were you I would think about implementing a memory manager in the not too distant future. You need some method of... |
Forum: Computer Science Jan 28th, 2008 |
| Replies: 35 Views: 21,557 You won't spend long in the world of hobby operating systems before hearing the name Bochs repeatedly mentioned. For all I know it might also be used in the development of commercial operating... |
Forum: Computer Science Jan 6th, 2008 |
| Replies: 5 Views: 21,522 The reason a new style of partition table is needed is simply that the MBR style of partition table won't be able to cope once hard disk capacities atart to exceed 2Tb, as they shortly will. |
Forum: Assembly Jun 20th, 2007 |
| Replies: 1 Views: 1,554 If I remember rightly the Mac uses (or used) a processor made by Motorola, so the obvious place to track down technical documentation for the said processor would be Motorola's website.
(Or try the... |