Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
93% Quality Score
Upvotes Received
19
Posts with Upvotes
18
Upvoting Members
10
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
0 Endorsements
Ranked #977

134 Posted Topics

Member Avatar for Sphinx'LostNose

The question seems a bit muddled. Almost all programs run directly on the processor, but the operating system does a lot of the heavy listing for them. Generally speaking the only program which: a.) Is not loaded by the operating system, and b.) Makes no use of operating system services, …

Member Avatar for rubberman
0
215
Member Avatar for lalitha2294

TASM is an ancient program written for MS-DOS. I may be mistaken, but I do not think that Windows 7 any longer supports old MS-DOS programs.

Member Avatar for tien.nguyen.3532507
0
1K
Member Avatar for silvercats

Some machine code instructions (the simpler ones) are implemented directly in hardware. Others will invoke a microcode program which is permanently stored within the processor. That microcode program will have access to all of the processor's internal registers - not just to the ones which the assembly language programmer has …

Member Avatar for Schol-R-LEA
0
426
Member Avatar for MasterHacker110

No multitasking operating system will let you directly manipulate the hardware, without the OS being involved somewhere along the way. If you had one program trying to write something directly to the screen, and another program trying to write to that selfsame area of the screen, at the same time, …

Member Avatar for mathematician
0
241
Member Avatar for silvercats

Assembly language cretainly does hide the internal operation of the processor. The cmp instruction is probably implemented as a microcode program which subtracts one number from the other, without storing the result, and then sets bits in the flags register depending upon whether the result is less than zeo, equal …

Member Avatar for mathematician
0
169
Member Avatar for ang19

If you are that much of a masochist, you would have to get hold of the technical reference manual(s) for your processor, and look up how assembly language instructions are encoded into machine code. Short of writing an operating system for a brand new model of computer, without any possibility …

Member Avatar for David_34
0
1K
Member Avatar for zbits

Why do you want to convert LBA to CHS? If you are thinking about the int 13h functions 2 and 3, try using their LBA equivalents, 42h and 43h instead. Most hard disks nowadays are programmed at the hardware level using LBA, and the conversion to CHS is done by …

Member Avatar for zbits
0
177
Member Avatar for Rahul47

"I would prefer a way where memory is not wasted and can be shrinked or expanded according to use. Is there any way to achieve it ?" C was originally developed for the purpose of writing an operating system, so it hasn't got much in the way of fancy stuff …

Member Avatar for mathematician
0
130
Member Avatar for SuperKingGT

mov ax, 6745 ;any random number xor dx,dx ;convert 16 bit number in ax into 32 bit number in dx:ax mov bx.10 ;radix div bx ;5 into dx, 674 into ax add dl, '0' ;convert to digit mov mem[4], dl ;save units column digit xor dx,ax ;dx:ax = 674 div …

Member Avatar for SuperKingGT
0
2K
Member Avatar for visakh_Here

If the file doesn't aleady exist, you need to open it with "w+" to reate a file for eading and writing. If it does already exist, you need to open it with "r+" for reading and writing. Not terribly logical, but there you are. Warning: If you try to open …

Member Avatar for mathematician
0
119
Member Avatar for Assembly Guy

mov al, 0x07 ; 0x07 = grey on black text colour stosb Why not load ah with 7 outside of the loop, and then do a stosw inside the loop?

Member Avatar for Assembly Guy
0
460
Member Avatar for Tinnin

i = sizeof(long); i *= 8; max = (unsigned long)pow(2, size); printf("Maximum size of unsigned long is %lu\n", max);

Member Avatar for Ancient Dragon
0
195
Member Avatar for sagngh8

Nowadays you probably only need to be familiar with assembly language if you are writing an operating system, a compiler or, possibly, a linker (because instruction sets have their quirks).

Member Avatar for mathematician
0
787
Member Avatar for MasterHacker110

Interrupts occur whenever a piece of hardware needs attention, or the processor detects an error condition. There are also software interrupts which are mostly just a matter of convenience, and provide a means of indirect addressing. Operating systems will mostly not allow applications to issue software interrupts, because they could …

Member Avatar for Schol-R-LEA
0
203
Member Avatar for Razahcy

If you are writing something like an operating system, and you have a system structure located at a fixed location, say 0x123456, then it would make sense to cast the integer 0x123456 as a pointer. Other than that, I can't think of any reason to do it.

Member Avatar for rubberman
0
385
Member Avatar for Haquo

There is really no such thing as an assembly language interpreter. The problem with trying to interpret something like "mov ax,3" is that the interpreter would itself be modifying the ax, and other registers, as it ran.

Member Avatar for Assembly Guy
0
690
Member Avatar for ram619

Because "" represents the single null byte which always terminates a string in C.

Member Avatar for ram619
0
110
Member Avatar for schematicc

If you are writing a text editor, you will need to store the characters being typed in into a buffer, and move characters right one place when you want to insert a new character. It would then be just a matter of redisplaying the buffers contents on the screen, with …

Member Avatar for mathematician
0
309
Member Avatar for حسنين_1

None, ecept that char nam[] is usually followed by a string to intitialise it: `char name[] = "George Bush";` Whereas char *name; just declares a pointer, to be pointed at something later.

Member Avatar for Ancient Dragon
0
119
Member Avatar for ww33ww

[code] mov ah, 1 int 21h ;read ascii digit mov str[0], al ;save digit to string mov ah, 1 int 21h ;read ascii digit mov str[1], al ;save digit to string lea dx, str ;ds:dx -> string mov ah, 9 ;print the string int 21h mov ax, 4c00h ;finish int …

Member Avatar for arya.herro
0
2K
Member Avatar for hellogoodday

I have never used INTO, and I have been programming the x86 processors for long enough. However, if you wanted to use it, you would have to write an interrupt handler for int 4, and then update the interrupt vector table so that the INTO exception was caught by the …

Member Avatar for untio
0
199
Member Avatar for silvercats

If you are talking about the x86 architecture, there is no difference unless you are doing something very esoteric, like writing an operating system.

Member Avatar for mathematician
0
129
Member Avatar for Clan Onion

If somebody was writing an operating system, they would probably want to get away from the messy bit flipping, associated with the hardware, as soon as possible, and instead have some nice abstractions to program. Also, by working with high level abstractions, if you wanted to port the operating system …

Member Avatar for mathematician
0
297
Member Avatar for Echo89

You could try intercepting the WM_PAINT message. The DefWindowProc might not be doing anything.

Member Avatar for GunnerInc
0
247
Member Avatar for ShiftLeft

Line 40 would need to be replaced by: mov cl, 4 shr dx,cl In the first x86 processors, only shr dx,1 or shr dx,cl were allowed (for dx or any other register).

Member Avatar for mathematician
0
541
Member Avatar for chira.laura.9

MEM32 DD 316423 ;reserves 4 bytes of memory for the number 316423 MOV AX, 43981 ;loads the least significant bits of 43981 into ax ;and since 43981 < 65535, that means all of it SUB DX, DX ;make sure dx = 0, so that all 32 bits of dx:ax now …

Member Avatar for mathematician
0
494
Member Avatar for silvercats

It is possible, but you would really have to know what you were doing, and it is unlikely to happen by accident. In assembly language the operating system is responsible for allocating memory, unless an operating system is what you are writing.

Member Avatar for mathematician
0
167
Member Avatar for silvercats

The x86_64 family of processors has got 16 general purpose 64 bit registers, making a total of 128 bytes. So 1kb does sound like rather a lot - although I can't claim to be familiar with the architecture of other processor families.

Member Avatar for Schol-R-LEA
0
228
Member Avatar for silvercats

The number of cores available is largely in irrelevance to an applications programmer. When it comes time for an application to run, the operating system will decide which core it gets to run on.

Member Avatar for mathematician
0
85
Member Avatar for shenamae.borja
Member Avatar for mathematician
0
148
Member Avatar for silvercats

1.) Yes. 2.) The process which goes on within the processor to figure out what a machine code instruction means. 3.) A register is just a small area of memory within the orocessor itself.

Member Avatar for mathematician
-1
276
Member Avatar for Xufyan

Scroll up/scroll down means that everything on the display (or in the window defined by cx/dx) moves up/down one or more lines. You probably want to put 7 in bh, which will give you the normal white text on a blck background. Almost always the page number is zero, unless …

Member Avatar for mathematician
0
181
Member Avatar for bobejoe
Member Avatar for mathematician
0
81
Member Avatar for nickcolb

You sound as if you might be referring to a microcontroller, rather than the x86 family of processors this site is mainly concerned with. If that is so, you might be better of on a forum which is dedicated to that family of microcontrollers. Possibly, the manufacturer might host one.

Member Avatar for mathematician
0
178
Member Avatar for aiwasen

As the previous poster said, masm is a command line program. The executable file for recent versions is called ml.exe. Different assemblers have different syntaxes. Some are very similar to masm, others are not so similar. Jwasm is one of the most masm like, but it is not exactly the …

Member Avatar for mathematician
0
159
Member Avatar for risen375

You seem to be mixing code and data, and you can't do that in assembly language. First you would need to have all the code, and then define the variables at the end .............. .............. mov ah, 04c int 021 M1 dw ? m2 dw ? M3 dw ? M4 …

Member Avatar for mathematician
0
112
Member Avatar for silvercats

*"Are DOS and Windows assembly different?"* Yes and no. DOS can only make use of the 16 bit instructions, whereas Windows also has access to 32 and (perhaps) 64 bit instructions. Also, operating systems perform various services on behalf of applications, such as writing stuff to disk. The interface between …

Member Avatar for brunoccs
0
194
Member Avatar for jemz

Use any editor you like. I use Textpad, but Emacs is well known, and easier to use than it once was. Learnig C first wouldn't do any harm. Familiarity with C will make it easier to learn C++. Whether C or C++ would be better depends upon the type of …

Member Avatar for Lucaci Andrew
0
319
Member Avatar for silvercats

>" why is that at the end don't they all get converted in to machine language?" Because machine language is what the computer understands. All the rest is just there to make things more readable, and less error prone, for us mere humans.

Member Avatar for MandrewP
0
501
Member Avatar for firdousahmad

"The C Programming Language" by Kernighan and Ritchie. Many years ago that is how I got started; after trying a couple of other books which were as clear as mud.

Member Avatar for firdousahmad
-1
106
Member Avatar for robgeek

Have you included a prototype for ReadFromFile() in the header file for main.c? Something like: char ReadFromFile(void);

Member Avatar for WaltP
0
354
Member Avatar for silvercats

No it wouldn't. Applications expect the operating system to do various things of their behalf, such as allocating memory, writing to disk, displaying stuff on the screen, getting keyboard input, and so on. Every operating system has its own way of making those services available to applications, and, apart from …

Member Avatar for silvercats
0
296
Member Avatar for silvercats

The chief motivation for developing 64 bit processore was that, as their name suggests, their registers are 64 bits wide and they can theoretically access a maximum of 18,446,744,070Gb of memory, compared to "only" 4Gb of memory for a 32 bit processor. The 64 bit processors which are currently in …

Member Avatar for silvercats
0
181
Member Avatar for silvercats

Assuming that they don't make use of some newer instructions, any assembly language program written for the architecture now joinly owned by Intel and AMD, can run on any of the processors you mention. The number of cores a processor has isn't really relevant, except insofar as it make the …

Member Avatar for silvercats
0
221
Member Avatar for EliStern

I am surprised you can get it to work at all, Normally a mulitasking operating system won't let an application touch the hardware. After all, if every program tried to directly program the hardware, chaos would reign. What if Windows was using the 8253/4 to feed its scheduler, and somebody …

Member Avatar for mathematician
0
503
Member Avatar for natnit

[quote=natnit;327315]Thanks for the reply. The picture you paint of the current situation is quite grim. :) I was thinking more along the lines of a string conversion from the array. I'm assuming there are string to int hash functions, and a string is nothing more than an array of characters. …

Member Avatar for Adak
-1
3K
Member Avatar for Chaky

It seems that Vista's successor (already under development) has at least three code names, because I understood it to be "Vienna". It also is said by those who should know that, currently being written, is a successor to Windows, so the next version of Windows, after Vista, might conceivably be …

Member Avatar for crunchie
0
480
Member Avatar for viperman224

[QUOTE=viperman224;22066]I'm not sure if this is the right spot to put this. I was wondering how would you create and operating system like linux or windows or novell. What programs would you use. I've always wondered how it was done. I would love to learn to create my own.[/QUOTE] You …

Member Avatar for davidkeeler63
-1
795
Member Avatar for Daysonn

To make DOS, and even some BIOS, calls from a TSR, you have to go to elaborate lengths to prevent the operating system from crashing. In particular, you need some DOS functions which Microsoft never officially documented until towards the end of MS-DOS's lifetime - although everybody knew they existed. …

Member Avatar for coffeeuncle
0
345
Member Avatar for mwmnj

Reference parameter just means that you are returning the address of a variable, rather than the value of a variable. So to return the variable varname by reference you would just do something like: lea eax, varname ret Then you could access the variable by doing something like: mov edx, …

Member Avatar for mathematician
0
298

The End.