-
Dec 30th, 2011, 12:42 AM
#1
Thread Starter
Junior Member
What IS Assembly??
Can Any 1 give me Basic COncept oF Assembly related to vb 6 and vb 2010 and Why it is used for???thanks in advance
-
Jan 5th, 2012, 09:39 AM
#2
Re: What IS Assembly??
Assembly instructions is the language that your processor speaks (Or rather machine code). Your processor does not directly execute VB, C, C++, or any other language.
An assembly instruction more or less directly maps to machine code.
VB.NET compiles to an intermediary language called CIL (formerly MSIL).
When you run your .NET application, the Just-In-Time (JIT) compiler will translate the CIL code to native code to be executed by the processor.
I'm probably missing some details in there somewhere but thats roughly how it works. Thats the relationship between VB and assembly instructions.
-
Jan 5th, 2012, 10:28 AM
#3
Re: What IS Assembly??
This is a site dedicated to Assembly so it won't directly relate to any specific development language (although it is probably most closely related to C)
http://www.friedspace.com/assembly/intro.php
-
Oct 4th, 2012, 05:50 AM
#4
New Member
Re: What IS Assembly??
Assembly is one of the toughest programming language which will be used in hardware of Embedded for the Micro controller of all the IC's as per the instructions which are related to the controllers of IC version. It also helps to get the Embedded c because it is one of the combination language with the C.
-
Oct 6th, 2012, 05:27 PM
#5
Member
Re: What IS Assembly??
If I can build on what some of the others have said:
The simplest computer would be some electrical relays cobbled together so that if this condition is met (relay 1 on) and that condition is not met (relay 2 off) then an output happens (relay 3 goes on). A microchip can be thought of as millions of microscopic relays, and we could program a microchip by telling each individual relay what to do, using a shorthand with 1 for on and 0 for off. It would be a nightmare of 10010110 00110101 10001001 and so forth, but it's possible. That's called low level programming.
Well, to make it easier, chip designer build in "BIOS" level instructions. Using those instructions, we can program the microchips without going blind typing 0 and 1. These use simple instructions called Interrupts. You place the data you need to manipulate into memory locations called "Registers," you trigger the appropriate Interrupt, and the output appears in a different register. This is not quite as low level -- It's called "Machine Language" and it's what all code winds up doing -- but it's the lowest level that you can actually work with.
That's still tough to manipulate, so the hardware people made up "Mnemonics." These are things like words that are easier to remember, and that you can use to write code that another programmer can make sense out of. That's Assembly language. It's very powerful, because it will do let you do anything that the machine is capable of doing.
As the programming languages get easier for programmers to read and use, they are called "high level" languages. VB is a very high level language. The only higher languages I can think of are various scripts, HTML, and "Batch file" programming. High level programs return syntax errors if you get them wrong, or refuse to do many things that you shouldn't do. Low level programs don't.
In short, Assembly is the lowest level code that is practical for a programmer to use. I hope that helps.
-
Oct 10th, 2012, 09:19 PM
#6
Lively Member
Re: What IS Assembly??
Called Instructions or OpCodes
-
Feb 9th, 2013, 08:35 PM
#7
Re: What IS Assembly??
Just a few.....
Assembly Instructions: What the programmer writes
Code:
'
'
HELLO CSECT
*
USING *,12
STM 14,12,12(13)
LR 12,15
LA 15,SAVE
ST 15,8(13)
ST 13,4(15)
LR 13,15
*
WTO 'Hello World'
*
L 13,4(13)
LM 14,12,12(13)
SR 15,15
BR 14
*
SAVE DS 18F
END HELLO
Machine Code: Assembly instructions assembled to machine code
Code:
5F23 F45C
D205 033F D03C
1A55
0255 3000
4F2C 2015
'
'
'
Assembler: Statements used by the Assembler - they are not converted to machine code
Code:
CNOP
COPY
END
EXITCTL
ICTL
ISEQ
LTORG
ORG
POP
PUNCH
PUSH
REPRO
CSECT
DSECT
ENTRY
EXTRN
DROP
USING
CCW
DC
DS
EQU
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Feb 16th, 2013, 12:01 AM
#8
Re: What IS Assembly??
Don't confuse assembly language with machine code.
Most decent assemblers (the assembly language analog of compilers) are quite sophisticated. They manage memory locations as symbolic names, offer powerful macro facilities, do assembly-time expression evaluation, have data table building features, pack literal values into string pool blocks, create linkable modules, and a whole host of other things.
The fact that the output is machine code... isn't any different from saying that a compiler's output is machine code.
The main difference is that you are working at a far lower level, much closer to machine instructions, then when writing compiler language programs.
None of this has anything to do with the "BIOS" or other wacky things mentioned.
Modern CPUs offer sophisticated levels of security. These prevent user programs from executing privileged instructions, can prevent execution of data as code, isolate processes from each others' memory, and so on. The result is that using assembly language doesn't help you bypass security.
Microsoft offers a free one for non-commercial Windows programming: Microsoft Macro Assembler 8.0 (MASM) Package (x86)
-
Feb 16th, 2013, 01:57 AM
#9
Re: What IS Assembly??
Originally Posted by dilettante
Don't confuse assembly language with machine code.
Most decent assemblers (the assembly language analog of compilers) are quite sophisticated. They manage memory locations as symbolic names, offer powerful macro facilities, do assembly-time expression evaluation, have data table building features, pack literal values into string pool blocks, create linkable modules, and a whole host of other things.
The fact that the output is machine code... isn't any different from saying that a compiler's output is machine code.
The main difference is that you are working at a far lower level, much closer to machine instructions, then when writing compiler language programs.
None of this has anything to do with the "BIOS" or other wacky things mentioned.
Modern CPUs offer sophisticated levels of security. These prevent user programs from executing privileged instructions, can prevent execution of data as code, isolate processes from each others' memory, and so on. The result is that using assembly language doesn't help you bypass security.
Microsoft offers a free one for non-commercial Windows programming: Microsoft Macro Assembler 8.0 (MASM) Package (x86)
Who's doing that?
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Feb 16th, 2013, 02:06 AM
#10
Re: What IS Assembly??
Originally Posted by dilettante
Don't confuse assembly language with machine code.
Most decent assemblers (the assembly language analog of compilers) are quite sophisticated. They manage memory locations as symbolic names, offer powerful macro facilities, do assembly-time expression evaluation, have data table building features, pack literal values into string pool blocks, create linkable modules, and a whole host of other things.
The fact that the output is machine code... isn't any different from saying that a compiler's output is machine code.
The main difference is that you are working at a far lower level, much closer to machine instructions, then when writing compiler language programs.
None of this has anything to do with the "BIOS" or other wacky things mentioned.
Modern CPUs offer sophisticated levels of security. These prevent user programs from executing privileged instructions, can prevent execution of data as code, isolate processes from each others' memory, and so on. The result is that using assembly language doesn't help you bypass security.
Microsoft offers a free one for non-commercial Windows programming: Microsoft Macro Assembler 8.0 (MASM) Package (x86)
Not necessarily true. Depends on the data. If the data just happens to have same hex value as an instruction then it would execute it as an instruction.
Here's two ways that it is possible to execute data as code.
You can branch into the middle of a data stream
You can move data to a location where it overlays instructions
When programmers are not paying attention to what they are doing the above two are very common occurances. The computer does not know the difference between data and instructions and does not care since they all look like machine code.
As far as privileged instructions go one can execute them if one knows how to set their program to a supervisor state which is quite possible and easy to do.
This is not normal in the application world of programming but in the systems world of programming it is quite common.
Last edited by jmsrickland; Feb 16th, 2013 at 11:31 AM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Feb 16th, 2013, 04:40 PM
#11
Member
Re: What IS Assembly??
Originally Posted by dilettante
Don't confuse assembly language with machine code.
Most decent assemblers (the assembly language analog of compilers) are quite sophisticated. They manage memory locations as symbolic names, offer powerful macro facilities, do assembly-time expression evaluation, have data table building features, pack literal values into string pool blocks, create linkable modules, and a whole host of other things.
The fact that the output is machine code... isn't any different from saying that a compiler's output is machine code.
The main difference is that you are working at a far lower level, much closer to machine instructions, then when writing compiler language programs.
None of this has anything to do with the "BIOS" or other wacky things mentioned.
Modern CPUs offer sophisticated levels of security. These prevent user programs from executing privileged instructions, can prevent execution of data as code, isolate processes from each others' memory, and so on. The result is that using assembly language doesn't help you bypass security.
Microsoft offers a free one for non-commercial Windows programming: Microsoft Macro Assembler 8.0 (MASM) Package (x86)
I simplified. Sue me.
"BIOS" or "Basic Input/Output System" is, indeed, relevant to interrupts. From mnemonic "Assembly Code" you can call BIOS interrupts or DOS interrupts. In fact, DOS interrupts rely upon BIOS interrupt 21h.
BIOS interrupts are hard-coded; DOS interrupts use a BIOS interrupt to access hardware. It's a fine distinction, but it's a distinction.
For the purpose of answering "What is Assembly?" I think that my explanation was sufficient, though actual mileage may vary.
-
Feb 16th, 2013, 05:18 PM
#12
Re: What IS Assembly??
@ Og_ofthejungle
In you post #5 you made the following statement:
High level programs return syntax errors if you get them wrong, or refuse to do many things that you shouldn't do. Low level programs don't.
That is not exactly so. Assembly is a low level language and you better believe it will return syntax errors. Write a program in Assembly instructions or 'mnemonics' and put in the wrong operands. When you go to assemble it (compile) your program will get a syntax error and refuse to run your code.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Feb 16th, 2013, 05:19 PM
#13
Re: What IS Assembly??
@ Og_ofthejungle
In you post #5 you made the following statement:
High level programs return syntax errors if you get them wrong, or refuse to do many things that you shouldn't do. Low level programs don't.
That is not exactly so. Assembly is a low level language and you better believe it will return syntax errors. Write a program in Assembly instructions or 'mnemonics' and put in the wrong operands. When you go to assemble it (compile) your program will get a syntax error and the Assembler will refuse to compile your code into an executable modlule.
Last edited by jmsrickland; Feb 16th, 2013 at 05:24 PM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Feb 17th, 2013, 03:53 AM
#14
Member
Re: What IS Assembly??
Good point. But I have successfully compiled programs with significant errrors such as no terminator in a string or calling the wrong memory location.
-
Feb 17th, 2013, 06:08 AM
#15
Lively Member
Re: What IS Assembly??
I think the OP may have meant a .net assembly
http://en.wikipedia.org/wiki/Assembly_(CLI)
-
Nov 4th, 2013, 09:09 AM
#16
Member
Re: What IS Assembly??
Originally Posted by Atheist
Assembly instructions is the language that your processor speaks (Or rather machine code). Your processor does not directly execute VB, C, C++, or any other language.
An assembly instruction more or less directly maps to machine code.
VB.NET compiles to an intermediary language called CIL (formerly MSIL).
When you run your .NET application, the Just-In-Time (JIT) compiler will translate the CIL code to native code to be executed by the processor.
I'm probably missing some details in there somewhere but thats roughly how it works. Thats the relationship between VB and assembly instructions.
Thats is informative. I actually thought VB was like a blanket over the processor. Ha!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|