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

I inherited a C# application.  The development environment is Win10 64 bit, VS 2012 and the development machine has Microsoft Office Pro 2016 installed.  The problem is that the C# application has a lot of references to Microsoft.Office.Interop.Word which utilizes MS Office 2003 if I recall correctly (version 11 as opposed to version 14).

I can't get past this build error which states:

Assembly 'Microsoft.Office.Interop.Word, Version 14.0.0.0, culture = neutral, Public Key Token.......' which is a higher version than referenced assembly 'Office, Version=11.0.0.0, Culture neutral....."

I cannot remove the reference to either assembly without breaking a significant amount of the existing code.  I originally tried installing both and setting the 'Embed Interops Types = False' at the recommendation of .Net but that did not resolve the issue.

Any suggestions?
0
Get HTML5 Certified
LVL 9
Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

I want to do this

.
...
equ	0012h   ; wait for key press
cmp ax,011Bh  
..
.

Open in new window


after this in want to load a odder file any tips how .
0
Hi Experts! I have no idea how to debug this issue.... Any help would be appreciated!

I have a client who sends shipments to UPS to get Tracking information and status, etc. Occasionally they have to void an airbill... all the functions work as desired with the exception of the "void" switch.

For example:

Z:\UPS\NewUPS.exe track << works great

Z:\UPS\NewUPS.exe ship << works great

Z:\UPS\NewUPS.exe void << Throws the error (was working a few months ago)


Error Message

 .Net Framework Error:


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

************** Exception Text **************
System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at System.Data.Common.UnsafeNativeMethods.IDBInitializeInitialize.Invoke(IntPtr pThis)
   at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper)
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
   at …
0
I have a table that has 4 triggers on it.
An api does an insert or update on the table and these triggers fire.

On that same server I have an assembly installed... which a function calls

How can I add a call to that assembly function after the LAST trigger fires?
Is there a way to determine the ORDER of the triggers...
And then should I add that function to the Trigger...??
0
HI All,

I have this powershell script and I need find a secure way of storing the password. I've tried :

$response = Read-host "What's your password?" -AsSecureString 
$Password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($response)

Open in new window


and this will not work.

below is my script, how do I load the assembly, it prompts and error saying :

Unable to find type [Microsoft.VisualBasic.Interaction]. Make sure that the assembly that contains this type is loaded.
At line:1 char:1

this is the code
#Specifiy Local admin account name
$user = "mcadmin"
  
Add-Type -Assembly System.Web
$pass=[Web.Security.Membership]::GeneratePassword(20,0)
NET USER $user "$pass" /ADD /y
#Add user to local admin group
NET LOCALGROUP "Administrators" "$user" /add
#set password to never expire
WMIC USERACCOUNT WHERE "Name='$user'" SET PasswordExpires=FALSE
  
Write-Host "Username: $user" -foregroundcolor green -backgroundcolor black
Write-Host "Password: $pass" -foregroundcolor green -backgroundcolor black
Write-host "Server: $env:computername" -foregroundcolor green -backgroundcolor black

# Load the classes from KeePass.exe:
cd "\\smile01\Infrastructure\KeePass-2.34" | out-null
(Get-ChildItem -recurse $script:myinvocation.mycommand.path | Where-Object {($_.Extension -EQ ".dll") -or ($_.Extension -eq ".exe")} | ForEach-Object { $AssemblyName=$_.FullName; Try {[Reflection.Assembly]::LoadFile($AssemblyName) } 

Open in new window

0
Just when you thought Google Glass was dead and buried (thanks to public stigma), yesterday they announced an enterprise version:
http://www.x.company/glass/

Here's a blog post from the Glass project lead (Jay Kothari) that explains some of the things they're doing in the enterprise.

instruction manual compared to glass Using these for helping factory workers in assembly, inventory management, etc., on first glance looks like a no-brainer.  Giving a surgeon the ability to monitor vital signs of a patient while elbow deep in a heart transplant, amazing. Seems like enterprise is where the Glass project should have started in the first place.

3
 

Expert Comment

by:Daniella Barion
Like a zombie!
1
 
LVL 6

Expert Comment

by:Brian Matis
There's definitely a lot of potential in this type of product. I keep thinking it'll be Apple that manages to make something stylish enough to get mass-market appeal though.
0
He, i wanna add a .newmessage line under

	.message	db 'Hallo en welkom to installasie van pirom client', 0

Open in new window

but when adding jest a new line .      .message      db '....' ,0
do not works

: error: symbol `.message' redefined

;------------------------------------------------------
; Install screens 1 
;------------------------------------------------------
	BITS 16
	ORG 32768
	%INCLUDE 'pirom_dev.inc'

start:

        mov ax, .title_msg
	mov bx, .footer_msg
	mov cx, 10011111b	; Colour
	call os_draw_background

	mov si, .message
;	mov ax, .buffer
	call os_print_string
	
	.message	db 'Hallo en welkom voor de installasie van pirom', 0
	
	.title_msg	db 'Pirom Setup', 0
	.footer_msg	db 'Setup', 0

Open in new window

0
I have a dll .Net class that is loaded on SQL Server 2008R2

A function calls the dll and passes in parameters
How can I change those parameters to allow incoming nulls on a few of them?

<Microsoft.SqlServer.Server.SqlFunction>
    Public Shared Function GTNG(user As String, token As String, PID As String, OID As String, TSW_ID As String, FirstName As String,
    LastName As String, IsOwner As String, EmailAddress As String, AccomName As String, ... etc...etc...
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
Dear community,
We have Problems with active sync in Exchange 2016 CU5.
After a Migration from Exchange 2010 to Exchange 2016 CU5 the following error occours when we connect with active sync:

OWA is working!

exchange analyzer
Event code: 3008
Event message: A configuration error has occurred.
Event time: 07.07.2017 08:10:45
Event time (UTC): 07.07.2017 06:10:45
Event ID: d049c0dd0f3b4cc4986b58ec61b74869
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/2/ROOT/Microsoft-Server-ActiveSync-4285-131438814449264551
    Trust level: Full
    Application Virtual Path: /Microsoft-Server-ActiveSync
    Application Path: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync\
    Machine name: XXX
 
Process information:
    Process ID: 18536
    Process name: w3wp.exe
    Account name: IIS APPPOOL\DefaultAppPool
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Could not load file or assembly 'Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync\web.config line 251)
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at …
0
Free Tool: Port Scanner
LVL 9
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

An error occurred creating the configuration section handler for loggingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\Suresh\eDoc\eDoc New
0
 
LVL 11

Expert Comment

by:Andrew Leniart
Welcome to Experts Exchange suresh.

Please use the Ask a Question button at the top of your browser window if you need help resolving a problem with your computer.
0
I'm programming Infineon TC29x Aurix Tricore Microcontroller based embedded system in 'C' language.  

Consider stack starting address 0x5000 0000.  The stack size is 0x2000.  

If I take current stack pointer minus 0x2000, will that create stack exception?  If yes, what might be 'C' or assembly language code that will achieve this?

My thought is if I subtract negative 0x2000 from current stack pointer or add 0x2000 to current stack pointer, I'll be outside stack and stack exception will occur ?

 I need to set program counter to illegal address, i.e. 0x00FF FFFC.  Can this be done with assembly language instructions?
 If yes, please instrument assembly language instruction that would set program counter to 0x00FF FFFC while code is running.
0
I'm trying to create illegal instruction reset.  

I'm programming Infineon TC29x Aurix Tricore Microcontroller based embedded system in 'C' language.  

I need to set program counter to illegal address, i.e. 0x00FF FFFC.  Can this be done with assembly language instructions?
If yes, please instrument assembly language instruction that would set program counter to 0x00FF FFFC while code is running.
0
I am trying to run a C# Unit test in visual studio, and I am getting the following errors on "DatabaseFactory.CreateDatabase()" from the namespace "Microsoft.Practices.EnterpriseLibrary.Data."


Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.1304.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system could not find the file specified.

{"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.1304.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system could not find the file specified.":"Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.1304.0, Culture=neutral, PublicKeyToken=null"}

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.1304.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/Users/username/Source/Workspaces/myProject/myProject1/myProject2/TestResults/Deploy_username 2017-06-15 09_33_17/Out
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\username\Source\Workspaces\myProject\myProject1\myProject2\TestResults\Deploy_username 2017-06-15 09_33_17\Out\SLV.Fest.MessageGenerators.Test.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from
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
I am attempting to register a remote machine on team services with Powershell. When I enter the script on the remote machine and attempt to run it, I get the error below: Cannot add type. The assembly 'System.IO.Compression.FileSystem' could not be found. I have copied the registration script from the Deployment Groups section on team services online.

The server that I am using is windows server 2008 R2. The script is below:

$ErrorActionPreference="Stop";If(-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”)){ throw "Run command in Administrator PowerShell Prompt"};If(-NOT (Test-Path $env:SystemDrive\'vstsagent')){mkdir $env:SystemDrive\'vstsagent'}; cd $env:SystemDrive\'vstsagent'; for($i=1; $i -lt 100; $i++){$destFolder="A"+$i.ToString();if(-NOT (Test-Path ($destFolder))){mkdir $destFolder;cd $destFolder;break;}}; $agentZip="$PWD\agent.zip";(New-Object Net.WebClient).DownloadFile('https://github.com/Microsoft/vsts-agent/releases/download/v2.116.1/vsts-agent-win7-x64-2.116.1.zip', $agentZip);Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory($agentZip, "$PWD");.\config.cmd --deploymentgroup --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://aaosprojects.visualstudio.com/' --projectname 'xxxxxxxProjects' --deploymentgroupname "xxxxxxxxxDeploymentGroup" ; Remove-Item $agentZip;
0
Hi Team,


We are trying to run the .rdlc report  using c# code in asp.net using reportviewer control in aspx page.


And when we run this website on prod server we are getting following error:


****************************************************************************************************************


Exception in page load eventand exception is
---Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred
during local report processing. --->
Microsoft.Reporting.DefinitionInvalidException: The definition of the report
'Test-Consolidate.rdlc'
is invalid. --->
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
unexpected error occurred in Report Processing. --->
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified. at
Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(Report
report, AppDomain compilationTempAppDomain, Boolean refusePermissions) at
Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.<>c__DisplayClass1.b__0()
at
Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.b__0(Object
state) at System.Security.SecurityContext.Run(SecurityContext securityContext,
ContextCallback callback, Object state) at …
0
I am trying to create this Function from the assembly code below
(I have several integer and string finctions that work... I am trying to essentially return the datatable list to SQL)
But I am getting this message
CREATE FUNCTION for "EverywareTemplates" failed because T-SQL and CLR types for return value do not match.

CREATE FUNCTION [dbo].[EverywareTemplates] (@user NCHAR(200), @token NCHAR(200))
RETURNS Table (TemplateID INT, TemplateType NCHAR(200), TemplateName NCHAR(300)) WITH EXECUTE AS CALLER
AS EXTERNAL NAME [HelloEveryware].[HelloEveryware.PassIn].[MessageTemplates];

Open in new window


From This .Net assembly function
    <Microsoft.SqlServer.Server.SqlFunction>
    Public Shared Function MessageTemplates(user As String, token As String) As [b]DataTable[/b]
        Try
            Dim ret As New DataTable
            Dim api As New wsclientapi.Service
            ret = ConvertToDataTable(api.brkGetTemplates(user, token))
            Return ret
        Catch ex As Exception
            File.WriteAllText(Convert.ToString("D:\netAssemblies\errorfile.txt"), ex.Message + Environment.NewLine + Environment.NewLine + ex.StackTrace + Environment.NewLine + Environment.NewLine + ex.InnerException.Message + Environment.NewLine + ex.InnerException.StackTrace + Environment.NewLine + Environment.NewLine)
            Return Nothing
        End Try
    End Function

Open in new window

0
Okay guys so I know I saw a similar thread like this already but I am still confused as to what my input should be.

I know this function takes in a string of length 6 and then it converts the characters somehow and they need to add up to 0x24 or 36
which can be seen at line <+53>.

The array table gives me values but I have no clue as to what letters correspond with what numbers. If I enter ffffff then masking the numbers for the right most bits gives me f  =  0110 or 6. ffffff = 36 but this still explodes my bomb.

Can someone please help me . Thank you.


Dump of assembler code for function phase_5:
   0x0000000000401123 <+0>:     push   %rbx
   0x0000000000401124 <+1>:     mov    %rdi,%rbx
   0x0000000000401127 <+4>:     callq  0x401361 <string_length>
   0x000000000040112c <+9>:     cmp    $0x6,%eax
   0x000000000040112f <+12>:    je     0x401136 <phase_5+19>
   0x0000000000401131 <+14>:    callq  0x4015e4 <explode_bomb>
   0x0000000000401136 <+19>:    mov    $0x0,%eax
   0x000000000040113b <+24>:    mov    $0x0,%edx
   0x0000000000401140 <+29>:    movzbl (%rbx,%rax,1),%ecx
   0x0000000000401144 <+33>:    and    $0xf,%ecx
=> 0x0000000000401147 <+36>:    add    0x4025e0(,%rcx,4),%edx
   0x000000000040114e <+43>:    add    $0x1,%rax
   0x0000000000401152 <+47>:    cmp    $0x6,%rax
   0x0000000000401156 <+51>:    jne    0x401140 <phase_5+29>
   0x0000000000401158 <+53>:    cmp    $0x24,%edx
   0x000000000040115b <+56>:    je     0x401162 <phase_5+63>
   

Open in new window

0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Hello,
i am receiving an error after moving the database server to another drive. I have tried the following ways to move the data:
1. detach and attach, then manually copy the files to the new location
2. i ve tried using the copy wizard
I continue getting the same error any way that i move the database.
To try and resolve the issue, i have tried to use the following lines
USE <DatabaseName>
GO

EXEC sp_changedbowner ‘sa’
0
Hi All,

I have compile error below.


using System;
using System.Collections.Generic;
 
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Net;
using System.Web.Http;
 
using System.Web.OData;

Error      8      'System.Web.OData.Delta<ERVJGMERPDATASERVICE.TMCARCOLOR>' does not contain a definition for 'GetEntity' and no extension method 'GetEntity' accepting a first argument of type 'System.Web.OData.Delta<ERVJGMERPDATASERVICE.TMCARCOLOR>' could be found (are you missing a using directive or an assembly reference?)       

What component is missing ?

Thank you.
0
I have a CLR Assembly that I have loaded on two separate servers the exact same way.

On one server the function that calls the assembly works perfectly

On the other I get this message.
Makes no sense.

Cannot load dynamically generated serialization assembly. 
In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. 
Please see inner exception for more information.

Open in new window

0
Could not load file or assembly 'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7fef01ac775b6e05' or one of its dependencies. The system cannot find the file specified.
0
Hide a control in a continuous form based on the value of the previous record?

The form has a Button call cmdEdit.  The cmdEdit represents the button, the value Service and the button are what should not show if the service value is the same.

cmdEdit Service       ServiceType1
cmdEdit Service      ServiceType2
cmdEdit Service   ServiceType3

This is what the form needs to display

cmdEdit Service ServiceType1
                         ServiceType2
                          ServiceType3
0
I'm trying to run a test SSIS package using DTEXEC.EXE.   The package, which ONLY has an Execute SQL in it, runs fine in Visual Studio Version 12.

When I run from command line using DTEXEC.EXE, i get the following error:  Mixed Mode Assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information

I've searched the web and found the suggestion to add useLegacyV2RuntimeActivationPolicy="true".  If that's true for me in SSIS, I do not know how to do it.
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
>