Assembly

An assembly language (or assembler language) is a low-level programming language for a computer or other programmable device in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions. Each assembly language is specific to a particular computer architecture, in contrast to most high-level programming languages, which are generally portable across multiple architectures, but require interpreting or compiling. Assembly language is converted into executable machine code by a utility program referred to as an assembler; the conversion process is referred to as assembly, or assembling the code.

Share tech news, updates, or what's on your mind.

Sign up to Post

Take a string input and make only the first letter of every word in the string uppercase and display the result on assembly language

i use assembler emu8086
0
Cloud Class® Course: CompTIA Cloud+
LVL 12
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

When I compile someone c# code, I got the following warning.  What do I need to resolve this? Any idea?

The primary reference "xxxConfiguration" could not be resolved because it has an indirect dependency on the assembly "xxxAsync, Version=7.05.101.0, Culture=neutral, PublicKeyToken=58aa7495915e0000" which was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5".
0
Hi,

My SCCM 2012 server having problem getting update. Ps advice the error below. Tks


SMS_WSUS_Control_Manager (Tread: 8068 0x1F84)
System.Net.WebException: The request failed with HTTP status 503: Service Unavailable.~~   at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)~~   at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer()~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.ConnectToWSUSServer(String ServerName, Boolean UseSSL, Int32 PortNumber)

Failed to create assembly name object for Microsoft.UpdateServices.Administration. Error = 0x80131701.
0
Problem statement: I am trying to do a writeback through .NET assembly stored procedure in SSAS - Multidimensional Cube

Are there any server level settings ? or any additional roles setting?

**Note: User is already an admin.


The .NET code works perfectly fine when debugged from the visual studio, the connection to the server works and the cube update also works.

Issue:
1) When created an assembly using the dll file from .NET class library in the SSAS server, the calling of assembly stored procedure fails and throws error as follows;
a) Assembly Permission set : Safe/External Access
"Executing the query ...
Query (1, 6) Execution of the managed stored procedure UpdateCube failed with the following error: Exception has been thrown by the target of an invocation.Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed..
Run complete"
   
b) Assembly Permission set : Unrestricted
"Executing the query ...
Query (1, 6) Execution of the managed stored procedure UpdateCube failed with the following error: Exception has been thrown by the target of an invocation.An error was encountered in the transport layer.
The peer prematurely closed the connection..
Run complete"

Attached my .cs code which I build to obtain the dll file and then create an assembly on SSAS.
.Net.docx
0
Hello. I am working with floating point numbers in x86 assembly. I am doing an effort to understand the IEEE 754 document. I have no official document from IEEE. I am running this as an beginner with no budget enough to buy it. That is other problem.

I am facing it learning from open resources. How can I write a custom floating point number and load it into x86 registers? I want to see the program working with exact bits. Example. The program treats the sign bit, the exponent 8 bits and the 23 bits mantissa.

The idea is to supervise the work done. I am using OllyDbg as my tool to see behaviour of the program running in my machine. My machine is x86-based. I am working with Assembly. Some nice C code explaining it could be nice too.

I have no source code yet about this.

Please, thanks.
0
Hello. I am building an assembly program. I have no skills yet in this field. I am mainly a C++ programmer.

I am studying stack frames. I am set up a frame for a particular function, and it works. But when i call another function, it crashes.

I don't know how to set up it properly. I am tried setting up a stack frame from start but i dont' appears to do nothing. It crashes too.

Here is my original code. I don't know how to set up properly the stack frame.
;Copyright(c) Jorge Enrique Mesa Mosquera
;All rights reserved.

;GOALS:
;-Write a function and call it properly from the main body.
include 'win32ax.inc' ; you can simply switch between win32ax, win32wx, win64ax and win64wx here

;Print a string
;Ask for username
;Print a string
;Ask for password
;Look up in table for right matching credentials
;If the credentials exists, then create a file with the credentials.
;

;Print a message asking for username
;Ask for a username string
;Save username string in a string variable

;Print a message asking for password
;Ask for a password string
;Save password string in a string variable.

;Check if the


.code

main:


        call function_enrique

        call function_enrique2
        invoke  ExitProcess,0

;Enrique is a function that receives four parameters, and show a message box using Win API
function_enrique:
        push ebp
        mov ebp, esp
        sub esp, 16
        ;push edi     ; Save the values of registers that the function
  ;push esi     ; will 

Open in new window

0
I am learning assembly, and using TASM. When running code, I can't watch the registers. But now I am working with 32bit registers, and I don't know where to view and follow them in the debugger. Can someone help me please?
0
About half our class turned in this assignment on its due date; many of us are lost. Even though it's past-due, it's been nagging me, and I'm curious to find out how it works. I come here, hoping someone will be able to guide me, as to what I need to know about this diagram in order to answer its accompanying questions.

Here is what I know:

  • "Sequential instruction execution" is where each instruction is fetched and executed to completion before the next one begins.
  • The `popl` instruction moves the data element from the top of the stack/register into the specified operand.
  • `%esp` is the stack pointer

y86_sequential-1.png
0
I want to need a code of simple game with description in assembly language Masm
For e.g.
Tic tac toe game
0
hi, i want to ask opinion from experts regarding die attach process in semiconductor industry.

paste use for die attach is epoxy sumitomo crm 1084. i want to seek advice what is the best method for thawing process of this epoxy? currently the  storage is kept at temperature -40C and for thawing process is put the syringe vertically for 1 hour at room temperature.

I'm thinking of thawing it for 1 hour at toom temperature in slow moving situation. is it give better impact in overcome void inside epoxy problem or it will create more void by thawing in motion .

thank you expert
0
Cloud Class® Course: Microsoft Azure 2017
LVL 12
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

0000000000400fad <phase_3>:
  400fad:      48 83 ec 18                   sub    $0x18,%rsp
  400fb1:      64 48 8b 04 25 28 00       mov    %fs:0x28,%rax
  400fb8:      00 00
  400fba:      48 89 44 24 08             mov    %rax,0x8(%rsp)
  400fbf:      31 c0                      xor    %eax,%eax
  400fc1:      48 8d 4c 24 04             lea    0x4(%rsp),%rcx
  400fc6:      48 89 e2                   mov    %rsp,%rdx
  400fc9:      be 8d 29 40 00             mov    $0x40298d,%esi
  400fce:      e8 6d fc ff ff             callq  400c40 <__isoc99_sscanf@plt>
  400fd3:      83 f8 01                   cmp    $0x1,%eax
  400fd6:      7f 05                      jg     400fdd <phase_3+0x30>
  400fd8:      e8 b5 06 00 00             callq  401692 <explode_bomb>
  400fdd:      83 3c 24 07                cmpl   $0x7,(%rsp)
  400fe1:      77 3b                      ja     40101e <phase_3+0x71>
  400fe3:      8b 04 24                   mov    (%rsp),%eax
  400fe6:      ff 24 c5 c0 26 40 00       jmpq   *0x4026c0(,%rax,8)
  400fed:      b8 6c 03 00 00             mov    $0x36c,%eax
  400ff2:      eb 3b                      jmp    40102f <phase_3+0x82>
  400ff4:      b8 50 00 00 00             mov    $0x50,%eax
  400ff9:      eb 34                      jmp    40102f <phase_3+0x82>
  400ffb:      b8 b4 01 00 00             mov    $0x1b4,%eax
  401000:      eb 2d                      jmp    40102f <phase_3+0x82>
  401002:      b8 28 02 00 00             mov    $0x228,%eax
  401007:      eb 26                      jmp    40102f <phase_3+0x82>
  401009:      b8 70 01 00 00             mov    $0x170,%eax
  40100e:      eb 1f                      jmp    40102f <phase_3+0x82>
  401010:      b8 42 03 00 00             mov    …
0
Hi

I am using Visual studio 2015 to build a MVC project and I am getting this error. Please provide some help in resolving it.

Could not load file or assembly 'WebMatrix.Data' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Thank you,
Ritesh
0
Hi,

I have write Assembly using C# stored procedure (web services), it's working fine.
Only issue with Error Handling.
some errors i can catch (if Order Exisits) but most of Errors i can't catch. but when i was testing in the
unit test i can see it's working preoprly.But when after comipled and create assembly
most of Errors Can't track.
Any idea appriciated.
//property
        public static string ReturnMsg { get; set; }

//Error Catching part
catch (Exception ex)
            {
                //pipe.Send(ex.ToString());
                //pipe.Send(strValue + "\n" + strcount);
                //Get stack trace for the exception with source file information
                var st = new StackTrace(ex, true);
                // Get the top stack frame
                var frame = st.GetFrame(0);
                // Get the line number from the stack frame
                var line = frame.GetFileLineNumber();

                strcount = "Line Number " + line.ToString() + "-->" + ex.ToString();//ex.Message.ToString() +
                //pipe.Send(strValue + "\n" + strcount);
                ReturnMsg = ex.Message.ToString();
               //throw new Exception("Error: " + ex.Message);
            }

Open in new window


Note: i have check many examples. stackflows.But all are not working. I knew how to search and google find answer.
i would appriciate if any one show me or direct me any idea what's im doing wrong
0
I'm getting following Error message when i trying to create the following assembly

Msg 6544, Level 16, State 1, Line 1
CREATE ASSEMBLY for assembly 'System.ServiceModel' failed because assembly 'microsoft.visualbasic.activities.compiler' is malformed or not a pure .NET assembly.
Unverifiable PE Header/native stub.

Sql server version is :
Product : Microsoft SQL Server Developer (64-bit)
Microsoft SQL Server 2016 (SP1-GDR) (KB4019089) - 13.0.4206.0 (X64)   Jul  6 2017 07:55:03   Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows 10 Home 6.3 <X64> (Build 15063: )
0
Hi, When i trying to create assemble iam getting following Error Message


Msg 10301, Level 16, State 1, Line 22
Assembly 'Test_CLR' references assembly 'system.servicemodel, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.

Warning: The Microsoft .NET Framework assembly 'smdiagnostics, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.
Msg 6586, Level 16, State 1, Line 13
Assembly 'SMdiagnostics' could not be installed because existing policy would keep it from being used.

I tried following helps,but didn't work
https://stackoverflow.com/questions/2781624/sqlclr-using-the-wrong-version-of-the-net-framework
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/startup/startup-element


This kind of answer , im not sure how to do it

0
TITLE Program Template          (RevStr.asm)

; This program reverses a string.

.model flat, stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
Writestring PROTO
INCLUDE (where you have it stored)\Irvine32.inc

.data
aName BYTE "Abraham Lincoln",0
nameSize = ($ - aName) - 1

.code
main PROC

; Push the name on the stack.
      mov ecx,nameSize
      mov esi,0

L1:      movzx eax, aName[esi]      ; get character
      push eax                  ; push on stack
      inc esi
      Loop L1

; Pop the name from the stack, in reverse,
; and store in the aName array.
      mov ecx, nameSize
      mov esi, 0

L2:      pop eax                  ; get character
      mov aName[esi],  al            ; store in string
      inc esi
      Loop L2

; Display the name.
      mov edx,  OFFSET aName
      call Writestring
      call Crlf
INVOKE ExitProcess, 0
main ENDP
END main
0
I got the positive number multiplication right and I can kinda do negative numbers . but I cant do both at the same time
my try code
        INP
        STA A
        INP
        STA B
        LDA A
        BRZ END
        LDA B
        BRZ END
        LDA NUM
        SUB B
        BRP CHANGE
CHANGE  LDA NUM
        SUB B
        STA B
        LDA NUM
        SUB A
        STA A
LOOP    LDA B
        BRZ END
        SUB ONE
        STA B
        LDA P
        ADD A
        STA P
        BRA LOOP
END     LDA P
        OUT
        SUB P
        STA P
        OUT
        HLT
A       DAT
B       DAT
P       DAT 0
ONE     DAT 1
NUM     DAT 0
0
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Data.OleDb.OleDbException (0x80004005): Unexpected error from external database driver (1).
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at …
0
Hello, I am a beginner in assembly and I've began working on this lab called Binary Bomb. After much work I've gone through the first 4 phases of it so far, but phase 5 has me incredibly confused as to what I should be doing. So far, I believe the password necessary to complete this phase is a string of 6 chars, but other than that I am at a complete lost. I feel like I'm missing something crucial that I'm just not seeing. What should I be checking for here? Thanks.

Dump of assembler code for function phase_5:
=> 0x0000000000401105 <+0>:      push   %rbx
   0x0000000000401106 <+1>:      mov    %rdi,%rbx
   0x0000000000401109 <+4>:      callq  0x40135a <string_length>
   0x000000000040110e <+9>:      cmp    $0x6,%eax
   0x0000000000401111 <+12>:      je     0x401118 <phase_5+19>
   0x0000000000401113 <+14>:      callq  0x40164c <explode_bomb>
   0x0000000000401118 <+19>:      mov    %rbx,%rax
   0x000000000040111b <+22>:      lea    0x6(%rbx),%rdi
   0x000000000040111f <+26>:      mov    $0x0,%ecx
   0x0000000000401124 <+31>:      movzbl (%rax),%edx
   0x0000000000401127 <+34>:      and    $0xf,%edx
   0x000000000040112a <+37>:      add    0x4026c0(,%rdx,4),%ecx
   0x0000000000401131 <+44>:      add    $0x1,%rax
   0x0000000000401135 <+48>:      cmp    %rdi,%rax
   0x0000000000401138 <+51>:      jne    0x401124 <phase_5+31>
   0x000000000040113a <+53>:      cmp    $0x2d,%ecx
   0x000000000040113d <+56>:      je     0x401144 <phase_5+63>
   0x000000000040113f <+58>:      callq  0x40164c <explode_bomb>
   0x0000000000401144 <+63>:      pop    %rbx
 …
0
Cloud Class® Course: Amazon Web Services - Basic
LVL 12
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

i want to have 2 options in the Little man Machine? 1. user wants add 2 numbers and then in option 2 type letters for an Word examle nice or smile , user must have the option for either of the both in the beginning :(
0
I am getting following error while building my application

Severity      Code      Description      Project      File      Line      Suppression State
Error            The "Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\\XamlBuildTask.dll. Could not load file or assembly 'XamlBuildTask, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.      AppConfigWizard
0
I have an application that has been written for me and i have all the source code.  When i compile and run it i get the following error.  What can be causing this?

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.ToolStripMenuItem' to type 'System.Windows.Forms.Control'.
   at Accusoft.FSInvoicesDemo.MDIParent2.localFolderToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: …
0
CURRENT STATE: Customer is using IMS DC as legacy online component and IMS-DB & DB2 as backend databases.
 One of the legacy subsystems is Document production which uses ASF & DCF IBM utilities. ASF is for information passing and DCF is for Document production. ASF will get information from user when they submit customer information. Those attributes of information will be made into a virtual file format called SIB Type 1(we can also call it as traditional COPYBOOK). ASF will pass the SIB type 1 file after invoking online PDP(Parameter Determination Program) programs(they are written in assembler language). These PDP program will get some information from backend databases based on the parameters passed in SIB Type 1. They will be displayed to customer by ASF. If customer wants to print all info as letter he can do so with the help of DCF. Following illustration can help to understand the current state.

 Eg:- SIB 1 type 1 file(copybook) contains below fields. These fields will get filled based on the information given by the customer in legacy online screen.
 Policy number
 Surname
 Type of policy

 Now user give policy number (xy123456) as input, ASF will fill the policy number and send this SIB to PDPs like below.

 Policy number : xy123456
 Surname : ???
 Type of policy : ???

 PDP will get invoked by ASF. By following some business logic, the PDP will fill the remaining data in SIB type 1 file and send it to ASF.

 Policy number : xy123456
 Surname : …
0
I am trying to call some routine provided to me by a developer contained in a .dll.

I am working with on-premise 2013 SharePoint and have placed the .dll in the \bin directory.

FROM MSDN:

[You can store compiled assemblies in the Bin folder, and other code anywhere in the web application (such as code for pages) automatically references it. A typical example is that you have the compiled code for a custom class. You can copy the compiled assembly to the Bin folder of your Web application and the class is then available to all pages.

Assemblies in the Bin folder do not need to be installed in the Global Assembly Cache (GAC). The presence of a .dll file in the Bin folder is sufficient for ASP.NET to recognize it.]


My problem is I cant seem to find a way to reference this .dll.

I am using a script editor along with javascript.
Can anyone give me a sample of code to load the library and it's procedures.?
0
Hi everybody, I'm new in assembly 8086.
I tried to print a star every 5 seconds but i didn't succeed.
here is my code:

.model small

.data
star db '*'

.code
start:

mov ax,@data ;initialization
mov ds, ax
mov cl, 0h; save the last time we printed
mov bx,1; using as flag for the first time

pulse:
cli
mov al 0h ;seconds
in al, 070h
out al, 071h ;al=current second(time)
sti

cmp bx,01h
jz initial

sub al,05h; current time-5
cmp cl,al;
jz print
jmp pulse


initial:
dec bx

print:
mov dl,star;
mov ah, 2h
int 21h
mov cl,al; update the last time printed
jmp pulse

end start

my idea was to print a star in the beginning, save this time in the register cl and then to check in any pulse if 5 seconds were past, by subtracting 5 from the new time and compare it to last one.
the problem is that it prints only in the first time and then it stopped printing.
any idea??
thanks a lot!
0

Assembly

An assembly language (or assembler language) is a low-level programming language for a computer or other programmable device in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions. Each assembly language is specific to a particular computer architecture, in contrast to most high-level programming languages, which are generally portable across multiple architectures, but require interpreting or compiling. Assembly language is converted into executable machine code by a utility program referred to as an assembler; the conversion process is referred to as assembly, or assembling the code.

Top Experts In
Assembly
<
Monthly
>