Forum: Assembly Nov 8th, 2009 |
| Replies: 2 Views: 485 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 Nov 5th, 2009 |
| Replies: 2 Views: 372 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 Nov 1st, 2009 |
| Replies: 1 Views: 432 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 Oct 23rd, 2009 |
| Replies: 13 Views: 954 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: 418 |
Forum: Assembly Sep 20th, 2009 |
| Replies: 5 Views: 374 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: 416 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: 969 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: 969 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: 969 Since I use MASM it recognises 7c00h, but if I used NASM it would recognise 0x7c00. |
Forum: Assembly Sep 14th, 2009 |
| Replies: 22 Views: 969 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: 969 org 0x7c00
cli ;disable hardware interrupts
cld ;clear direction flag
xor ax,ax ... |
Forum: Assembly Sep 13th, 2009 |
| Replies: 22 Views: 969 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: 954 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: 423 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: Assembly Jul 11th, 2009 |
| Replies: 4 Views: 828 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,336 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,336 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,336 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: Assembly Jun 26th, 2009 |
| Replies: 9 Views: 1,121 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,121 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,121 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,121 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: 545 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,815 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,815 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: Assembly Jun 20th, 2007 |
| Replies: 1 Views: 1,596 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... |
Forum: Assembly Jun 8th, 2007 |
| Replies: 4 Views: 2,848 I tried typing it in to debug, and it worked ok for me. |
Forum: Assembly Jun 7th, 2007 |
| Replies: 4 Views: 4,494 Looks to me as if you are the unfortunate victim of a compiler which uses the AT&T syntax. |
Forum: Assembly May 26th, 2007 |
| Replies: 5 Views: 1,820 But what does "pop bx" do? You do not appear to have pushed anything which corresponds with that pop. |
Forum: Assembly May 25th, 2007 |
| Replies: 3 Views: 3,682 Move the cursor to a position off the screen (row 30, column 90 say), or clear bit 6, and set bit 5, in the CRT controller's cursor start address register. |
Forum: Assembly May 25th, 2007 |
| Replies: 5 Views: 1,820 It is difficult to know what to make of it. For example, what is this supposed to do:
JNE saisie
saisie:POP AX ; vider la valeur 010D
POP BX
Apart from jumping to the very next... |
Forum: Assembly May 16th, 2007 |
| Replies: 1 Views: 2,905 It seems fair to assume that you are trashing some memory used by legacy USB support. Memory probing is hazardous at the best of times. |
Forum: Assembly May 10th, 2007 |
| Replies: 2 Views: 4,951 Not sure I understand the question. Within the computer everything is obviously stored in binary, and it only becomes decimal or hexadecimal when it is output. |
Forum: Assembly May 7th, 2007 |
| Replies: 2 Views: 1,415 You would appear to have a program which goes something like:
_func
;push registers
;load eax and ecx
;if ecx > 0
; decrement ecx
; push registers
; jump back up to... |
Forum: Assembly Apr 28th, 2007 |
| Replies: 14 Views: 8,224 Actually int 21h function 2 will only display the single ascii character contained in dl. It will not output an entire string, and still less convert a floating point number into a string and then... |
Forum: Assembly Apr 24th, 2007 |
| Replies: 1 Views: 880 You could type "masm32" into a search engine, go to there site, download the zip file, click on the zip file, and let it install itself. |
Forum: Assembly Apr 22nd, 2007 |
| Replies: 4 Views: 1,304 I'm not sure if "name" is a reserved word. You could try calling it something else. |
Forum: Assembly Apr 21st, 2007 |
| Replies: 2 Views: 1,138 Bit 7 of the attribute byte. i.e., you want 0x8741 |
Forum: Assembly Apr 21st, 2007 |
| Replies: 4 Views: 1,304 name dword 20 dup(' '),0
is wrong. Probably it should be:
name db 20 dup( ' ' ), 0
But in the highly unlikely event that you really did need 32 bit double words there, it should be:
... |