# Assembly

1K

Solutions

2K

Contributors

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.

OS: Centos 7
I get a linker error after compiling this code. What steps do I have to take to build this program?
The author indicated that this is for 32-bit code; and later he may do a series on 64-bit. I am guessing that I am having a 32-bit/64-bit issue here.
I saw a comment that may shed some light:
"I had to run apt-get install gcc-multilib to compile 32 bit on ubuntu."
global main
extern printf

section .data
msg db "Testing %i...", 0x0a, 0x00

main:
;*** prologue - preserving stack, registers, and allocating space ***
push ebp      ; preserve caller's ebp (base pointer) value
mov ebp, esp  ; ebp holds the top of the stack
;*** END prologue - preserving stack and allocating space ***

push 123
push msg
call printf
mov eax, 0

;*** epilogue ***
mov esp, ebp  ; restore the top of the stack (effectively deallocates the stack)
pop ebp       ; restore the caller's ebp value
ret
;*** END epilogue ***

Configuration:
$uname -a Linux localhost.localdomain 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux$ nasm -v
NASM version 2.10.07 compiled on Jun  9 2014

$nasm -felf -y valid debug formats for 'elf32' output format are ('*' denotes default): dwarf ELF32 (i386) dwarf debug format for Linux/Unix * stabs ELF32 (i386) stabs debug format for Linux/Unix$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

$whereis crt1.o crt1: /usr/lib64/crt1.o$ which crt1.o
/usr/bin/which: no crt1.o in (/usr/lib64:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/user/.local/bin:/home/user/bin)

The error:
$nasm -f elf32 ex10.asm -o ex10.o$ gcc -m32 ex10.o -o ex10
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status

0
on HP 5500 Color Laserjet - error 51.2Y along with a grinding noise

Replaced laser scanner assembly - still received the 51.2Y error but no longer get the grinding noise

swapped the laser scanner assembly with the one below - still received the 51.2Y error and no grinding noise.

What else can I do to troubleshoot?

Thanks in advance for any direction
0
A consultant created a new web server using Server 2019. They then migrated our intranet over to it and started the iis services. The html pages of our intranet load, but the aspx pages do not.

I'm trying to compare the settings between the two iis servers and have not been able to figure out what is making me get the following error message when an aspx page tries to load:

Server Error in '/dotnet' Application.
Could not load file or assembly 'dotnet' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I should also add that I'm stumbling around in this area and am not by any means an expert.
0
I'm using Microsoft All Rules code analysis and it gives a warning "Pre is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class intended to contain only static members, make it static (Shared in Visual Basic) for below class;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutoMBS.Globals
{
internal static class Pre
{
private static int myVar;

public static int MyProperty
{
get { return myVar; }
set { myVar = value; }
}

}
}


I checked the documentation (https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1812?view=vs-2019) but i don't understand how to fix.
0
Hello everyone.

For starters, I do not make a lot of money in my self-business.
So, I have to get what I can get, in order to grow.
With that said.

I have just purchased an Intel SR2500ALBRP
The motherboard: S5000PAL

In the following image, you will see a BLUE set of SATA cables with a single PLUG at the end.

Now, The PCI riser assembly has only a NIC Card on it with DUAL 1G nics.
My question is simple.
WHAT RAID Card do I need to get, to connect this with?

Thanks.
Wayne
0
Error with resources when using ajaxtabcontainer.  I have other ajaxcontrols on the page (calendar) that have not had a problem, but after adding the tab container to the page I get an error as follows.

Error Rendering Control - Table2 An unhandled exception has occurred.
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Below is the code:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:Table ID="Table2" runat="server" Height="70%" Width="100%">
<asp:TableRow>
<asp:TableCell ID="TableCell22" RowSpan="6" Width="20%" VerticalAlign="Top" HorizontalAlign="Center"
BorderStyle="Inset" BorderWidth="2" BorderColor="Gray" runat="server" Height="100%" CssClass="CellPadding">
<asp:Panel ID="Panel2" runat="server">
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" BackColor="Black" BorderStyle="None"
Font-Names="Arial" Font-Size="10" ForeColor="#FFFFCC" AutoPostBack="True" TabStripPlacement="Bottom">

<ajaxToolkit:TabPanel runat="server" ForeColor="#FFFFCC" Font-Size="10"


0
Three images. The red lines show to broken hinge. This is a manufacturing defect from the first S-10 extended cab with third door that came off the assembly line. This hinge should have been made with metal. I've changed this three times and now on #4. The part from the dealer is expensive and the pull a parts yards are far and between on having the ones with the third door. And when they do the part is missing.
The orange line shows the holes through which the plastic pieces (blue lines) slide and one end of the broken hinge is shown in the red circle.
The pieces that have these plastic pins are on a threaded rod. On the back of the door opener part are two holes. When the handle is pressed the round holes do not move much. One goes down to pull the top rod (the one on the left) down to release the top of the door and the other one goes up when the handle is pressed to pull the right side rod up. I think the plastic pieces are about in the place they are supposed to be to put the required amount of tension on the handle to raise the right side rod that pulls up and releases the door latch at the bottom.

The problem, even though I have sprayed the door latches with WD-40, is that the amount of tension put on the plastic handle is too much and eventually the plastic hinge breaks.
The only way to get the door open is to have that piece removed and just pull up and down on the threaded rods. I tried that for over two years by stuffing a rag in the open space so the rods …
0
I'm getiing this sbt error and i'm new to sbt and i'm trying to compile the build.scala for my existing project. When searched for the below issue in google it says to add sl4j jars in your dependencies or classpath and it will work. But i get the same error again and again. Tried adding in build.scala file but still issue. Not sure if i have put in the right version etc.,
sbt
Detected sbt version 0.13.16
Starting sbt: invoke with -help for other options
Using /home/rsa-key-20190625/.sbt/0.13.16 as sbt dir, -sbt-dir to override.
[info] Set current project to Trendalyze spark job server (in build file:/devops/iot/installs/trendalyze-spark-job-server/)
> compile
[info] Compiling Templates in Template Directory: /devops/iot/installs/trendalyze-spark-job-server/src/main/webapp/WEB-INF/templates
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
at org.fusesource.scalate.util.Loganon$1.log$lzycompute(Logging.scala:31)
at

0
After running rollup update 27 for exchange 2010 last night.  I am getting a load of 1310 errors with the following detail.  I have renamed the config file to use the BAK version and restarted IIS but still getting the errors and owa is unavailable?

3008
A configuration error has occurred.
30/04/2019 10:01:08
30/04/2019 09:01:08

1
1
0
/LM/W3SVC/1/ROOT/Autodiscover-38-132010855589265555
Full
/Autodiscover
E:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover\

2564
w3wp.exe
NT AUTHORITY\SYSTEM
HttpException
Could not load file or assembly 'Microsoft.Exchange.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=************' or one of its dependencies. The system cannot find the file specified. (E:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover\web.config line 940)
https://mail.server.co.uk:443/Autodiscover/Autodiscover.xml
/Autodiscover/Autodiscover.xml
192.168.47.177

False

NT AUTHORITY\SYSTEM
1
NT AUTHORITY\SYSTEM
False
at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
0
I am getting an error on a page that uses entity and Telerik for a webforms application that uses .net 4.0 because I am not able to update to later version of .net.  Had a different error when trying to use entity framework 6.0 and went down to 5.0 and that error is gone and site loads but now the page I am trying to add has this issue.  See errors below when page is brought up.  Not sure how to see LoaderExceptions when on a server.  No problems running on development computer with Visual Studio 2017.

 Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0


0
I created a whole new Domain Server 2019 and have an Exchange Server 2019 and trying to install Exchange with the install Wizard and am stopped at 8 of 14.

Error:
The following error was generated when "$error.Clear();$agentName = "Mobile Message Receive Agent";
$agent = get-transportagent -Identity:$agentName;
if ($agent) { uninstall-transportagent -Identity:$agentName;
};
" was run: "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.Transport.Extensibility, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Exchange.Transport.Extensibility, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at …
0
Experts,

What would cause the following when running the this command :

Add-Type -Path 'C:\Test-CitrixRebootScript\UtilityFunctions\itext2\itextsharp.dll'


2\itextsharp.dll'
or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have attempted the following already :

0
I'm getting an error on this line in a new console c# project:

using Excel = Microsoft.Office.Interop.Excel;

Severity      Code      Description      Project      File      Line      Suppression State
Error      CS0234      The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)      excel1      E:\dotnet\excel1\excel1\Program.cs      2      Active

What do I need to be able to access excel spreadsheets from my console c# project.

Thanks in advance for any help.
0
CRM 2013, Dynamics 365 online

I am looking for a method to test plugins converted for D365 from CRM 2013.  With a Dev environment, how can this be done using Visual Studio and the PRT?

Ideas are: on Dev, if we register the plug-in assembly, ,register a plug-in step for an event and test its execution by doing whatever is shown in the code.  For example, step through the code as a plugin and test that it performs the actions in the CRM 2013.

Questions: can Visual Studio be used in Debug mode to step through the code and provide an adequate test?  Can the PRT be used to view the registered plugin and verify that the plugin ran as expected?

Thanks
0
I have a .Net Framework (4.6.1) class library project (call it A).
Then I have a UWP app (call it B), and I want to use the code in A by referencing to A from B. But that is not possible. UWP apps are .Net Core and not compatible with .Net Framework.

So I created a .Netstandard 2.0.3 class library project (call it C), to be a proxy between A and B. I now reference from A (the UWP app) to C (the .Netstandard class library), and then from C to B (the .Net framework class library).

Everything compiles now, but when I run/debug the UWP app in Visual Studio I get the following error originating from the code in A:

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.'

System.Web.ApplicationServices is a .Net Framework reference in A, and is not compatible with B. I was hoping to get around this by using .Net standard and C as a proxy between A and B.

Any suggestions on how to fix this?

Code examples won't help here, the code works fine, but not the integration between the various technologies.
0
Accountant sends us tax returns as password protected PDFs (password needed to open it.  Properties says it was created with Thomson Reuters FileCabinet CS.  The security tab says I can print, copy contents, comment, etc (I can do everything execpt doc assembly and page extraction, whatever those are : )

I click on them in outlook, it opens in Acrobat Reader DC ( free version) - this is on a windows 10 pro machine by the way.

I want to keep a PDF without the password.  So print to PDF?  But they get sooo much larger

Working on it now, he sent a 24 page PDF that is 93kb

trying different apps:

microsoft print to PDF - 673kb
Tried printing with PDF Creator, but it balks because PDF is password protected (to open, and printing is allowed).  WTF!

Tried opening in chrome.  printing w/ microsoft print to pdf made it a 5MB file!  And still can't use pdf creator.

What's a good combination for opening & printing a PDF or some other easy way to strip off password protection to open a PDF
0
I have an access database that I am converting to a vb.net project.  There are a few lines of script that are causing issues.  Mostly the DLookup conversion.  Any help at converting this script would be most appreciated.  Thank you in advance!

Here is the original VBA code:

Private Sub Form_Timer()
'On Error GoTo ErrTrap:
Dim DB As Database
Dim rs As Recordset
Dim count As Integer
Dim displayCount As Integer
Dim formToOpen As String
Dim stopTime As Date
Dim nowTime As Date
Dim WinWnd As Long

'Determine if a member of management has set an alert message. If not, continue normal operations

DoCmd.OpenForm ("frmMessage")

Else

Call Form_Query

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'Run the NRFT screen for 1 minute, then open the safety message
If runCount = 2 Then
DoCmd.OpenForm ("Form1")
End If

'Close the safety message after 1 minute
If runCount = 5 Then
DoCmd.Close acForm, "Form1"
End If

If runCount >= 8 Then

'Loop through all rows in the Content table where Active is set to yes
'For Count = 0 To DCount("Active", "Content", …
0
I have an ASP.NET web forms project, currently running in .net 4.5 version. I am trying to migrate the source code to bitbucket. I pushed the code and compiled the project successfully. when I try to run the project, I get an runtime error shown below -

In the project, under references I see system.web.helpers.dll, but the inside the folder  (C:\documents\repos\myproject\bin\System.Web.Helpers.dll )  the dll is not there.

when i go to nuget package manager , and search for system.web.helpers.dll , I can't find it.

Questions -

1. Is this dll no longer available and is replaced by something else?
2. I suppose, when the project was created initially, a reference to dll was added to the project. and looking at the folder path for the dll in the project ( C:\documents\repos\myproject\bin\System.Web.Helpers.dll), when i did a clean build the dll must have been deleted . when the dll was added initially, was it supposed to be in the bin folder?
3. or was this dll availabe in older version of .net ? if i update the .net framework version, I would probably need to update other dlls too, which I am trying to avoid.
4. what are best practices in such situations?
0
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;

using System.Collections.Generic;
using System.ComponentModel;

using System.Drawing;
using System.Text;
using System.IO;
using System.IO.Ports;
using System.Text.RegularExpressions;
using System;

public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void SqlStoredProcedure1(string strPortName, string strBaudRate, String strPhone, String StrMsg)
{
try
{
bool sms_status;
SerialPort port = new SerialPort();
port.PortName = strPortName;
port.BaudRate = Convert.ToInt32(strBaudRate);               //updated by Anila (9600)
port.DataBits = 8;
port.StopBits = StopBits.One;
port.Parity = Parity.None;
port.WriteTimeout = 300;
port.Encoding = Encoding.GetEncoding("iso-8859-1");
port.Open();
port.DtrEnable = true;
port.RtsEnable = true;
StoredProcedures p = new StoredProcedures();
sms_status = p.sendMsg(port, strPortName, strBaudRate, strPhone, StrMsg);
}
catch (Exception ex)
{
throw ex;
}
}

//Close Port
public void ClosePort(SerialPort port)
{


0
Hi Experts,

I have an application with a reference to Microsoft.SQLServer.BatchParser.dll
I have a problem when I install my application with batchparser (version 9 - SQL2005) and try to update it to batchparser (version 14 - SQL2017)

The assembly is in the directory of the application, but when I try to run the application I get the error message "Could not find file or assembly 'Microsoft.'SqlServer.BatchParser.dll' or one of its dependencies. The specified module could not be found".

Is it possible to update this assembly by copying it to the application directory? Because this is an update, I do not want to manually register or install anything.
I have tried building my application in x86 instead of AnyCPU, but still have the problem.
0
Create assembly [SMS_Attend]
with permission_set = unsafe


CREATE ASSEMBLY failed because it could not open the physical file 'C:\Users\Muhammad\Documents\Visual Studio 2015\Projects\Database3\Database3\bin\Debug\Database3.dll': 5(Access is denied.).

0
I have an assembly on a customer SQL Server that has been working for a year flawlessly
It passes data to a web service
Their server is a SQL 2008R2

I have the SAME Assembly loaded on a SQL 2008R2 of our own

Neither have been changed
All of a sudden the customer is timing out with the attached error

I can run the same process on my server virtually instantaneously

Any ideas?

Msg 6522, Level 16, State 2, Line 2
A .NET Framework error occurred during execution of user-defined routine or aggregate "EverywareGTG":
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
at HelloEveryware.PassIn.GTG(String user, String token, String PID, String OID, String TSW_ID, String FirstName, String LastName, String IsOwner, String EmailAddress, String AccomName, String AccomAddress, String AccomState, String CheckinDate, String CheckinTime, String CheckoutTime, String AccomNights, String TourDate_Disp, String TourWave, String TourLocation, String ContactUsPhone, String DateAdded, String SendNow, String AccomCreationDate, String AccomPhone, String ActivitySeason, String CampaignName, String CancellationPeriod, String CheckinDate_Disp, String CheckInDayOfWeek, String CheckoutDate, String CheckoutDate_Disp, String ContactUsEmail, String ContactUsSignature, String OpenDate, String OpenExpirationDate, String OpenExpirationDate_Unix, String OpenMonths, String OwnerAgentName, String OwnerLottoPreferenceLevel,

0
Hi,  I have another error in my .NET application.

"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. "

0
C# web service calling another .NET assembly using reflection
I use a web service to a run-time assembly call using C# Reflection.
The assembly is in Binary format in database. All records contains a binary data which is almost same in structure. It has a Start method in a class called 'MyAssembly'
First I loads assembly object using  the Binary data, then finds the type - MyAssembly from it and then calls a method 'Start'. The start will write the logs into a directory. This works entirely fine when we call from an executable. All executables goes into separate process ID and the results are getting.

Then calling the same step using a Web service hosted in IIS, the results are getting messed up. Simultaneous calls to the same method gets the results into different different calls.
Example: Method1 called using web service and the logs are writing into File1.
Method1 again called using different arguments and the logs are writing into File2.
When calling method1 two times at the same point of time using web service, gets the logs messed up, File1 details are showing in File2 and File2 are in File1. It is not only the logs issue bug also the execution are getting wrong that inner methods are not getting proper outputs and return values. Everything messed up.

When the web service is calling EXE program (Which is not allowed in so many conditions) - That is without finding out the method using reflection and then calling it, it just calls an exe program using …
0
I'm following the example on https://docs.microsoft.com/en-gb/visualstudio/test/walkthrough-creating-and-running-unit-tests-for-managed-code
When I add the reference to Bank.sln I'm getting a message:

A reference to D:\Documents\UnitTesting\Bank\Bank.sln could not be added.  Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Could it be because Visual Studio 2017 is installed on my C drive and this project is on my D drive?  I'm using C#.net
0

# Assembly

1K

Solutions

2K

Contributors

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.

## Related Topics

Top Experts In
Assembly
Monthly

No Top Experts for this time period. Answer questions to earn the title!