Assembly

1K

Solutions

1

Articles & Videos

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.

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

Sign up to Post

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
Free Tool: Site Down Detector
LVL 8
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

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
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
Free Tool: SSL Checker
LVL 8
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

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
I have an assembly I added to SQL
It has 4 parameters in the vb code that are all string


In SQL Server I added the assembly...
But when I try and run this...
CREATE PROCEDURE [dbo].[HelloEveryware] (@user VARCHAR(100), @token VARCHAR(100), @PID VARCHAR(100),@ProspectID VARCHAR(100) )
--RETURNS BIT WITH EXECUTE AS CALLER
AS EXTERNAL NAME [HelloEveryware].[HelloEveryware.PassIn].[Confirmation];

I get this message
Msg 6552, Level 16, State 3, Procedure HelloEveryware, Line 1
CREATE PROCEDURE for "HelloEveryware" failed because T-SQL and CLR types for parameter "@user" do not match.

the VB side of this is...

Partial Public Class PassIn
    <Microsoft.SqlServer.Server.SqlFunction>
    Public Shared Function Confirmation(user As String, token As String, PID As String, ProspectID As String) As Int32
0
summation,Subtraction,multiplication,division in Aseembly?
0
I have an array that identifies the level in the Tree that I want.  I know that I need to do a recursive routine, but I keep getting stuck.  I have the first node created.  Now I need to recursively explode the subnodes of each of the level 1 nodes.  Here is the data:
Seq      bom_level      Node_text
0      1      1__1100-079__UMBRELLA SUPPORT
1      2      2__1100-079-003__SUPPORT UMBRELLA
2      3      3__1100-079-003-001__TUBE STAND
3      4      4__TR3C-0150.0009__TUBE_RND_CARBON-C_1.50_.095
4      3      3__1100-079-003-002__PLATE BASE
5      3      3__1100-079-003-003__ANGLE SUPPORT
6      4      4__UA1C-0250.0200.0025__ANGLE_CARBON-H_2.50X2.00_.25
7      4      4__UA1C-0250.0200.0025__ANGLE_CARBON-H_2.50X2.00_.25
8      3      3__1100-079-003-004__BAR SUPPORT
9      4      4__BS1C-0050__BAR_SQR_CARBON-H_.50
10      2      2__O-059-215__U-BOLT
11      2      2__O-060-003-A__WASHER HARD
12      2      2__O-061-003__WASHER LOCK
13      2      2__O-005-016__SCREW HEX
14      2      2__O-062-009__NUT HEX
15      2      2__O-060-005-A__WASHER HARD
16      2      2__O-059-216__PIN QUICK RELEASE
17      2      2__B-005-052__UMBRELLA W/BRACKET
18      1      1__1100-133__BRAKE ASSEMBLY
19      2      2__D-001-035__CALIPER BRAKE
20      2      2__1100-056-002__DISC BRAKE
21      2      2__1100-056-003__PLATE BLOCK MOUNTING
22      2      2__1100-056-004__SCREW HEX
23      2      2__O-076-024-1__SCREW SOC
24      2      2__O-063-012-A__NUT LOCK
25      2      2__O-063-012-A__NUT LOCK
26      2      2__O-060-006-A__WASHER HARD
27      2      2__K-002-292__BOLT FLANGE
28      2      2__K-002-292__BOLT FLANGE
29      1      1__1100-338__COOLER OIL ELECTRIC COLD WEATHER
30      2      2__K-006-037__COOLER OIL REMOTE
31      2      2__B-004-078__SWITCH
32      2      …
0
I don't know how to start this program. Can anyone help me on this or give some ideas to solve this problem
0
Have a user when a new computer who is using a Winforms application with Crystal Reports on it that was deployed.  An installer is NOT used.  Files are deployed.  When user runs the application they receive the above error.

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Shouldn't the EXE solve the issue?  Or download the MSI?  Which file should be installed on the computer.
0
Free Tool: Subnet Calculator
LVL 8
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hello,

When attempting to access a DLL file using code below,

 Dim frm1 As New AOP40A.Form1
 frm1.Show()

(Dll file was added in the Reference section.)

I receive the following error:

An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll

Additional information: Could not load file or assembly 'AOP40SearchA, Version=1.0.6233.29534, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Also received a message indicating:

The call stack contains only external code:

You need to turn off Just My Code and load symbols in order  view source for this location. How do I disable Just My Code? Perhaps that would fix the error.

Thanks,  

Victor
0
programe code

generate int from 1 to 10 using loop and calculate theie squares inside the loop store in an array

please help me
0
I need a help of reading from file equations and turn them from infix to postfix then find the result by using stack in assembly language .
0
I have a desktop vb.net application developed in VS 2010 with a SqlServer 2008 R2 back end which utilizes the Microsoft.SqlServer.Types assembly as a reference (copy local).  The application was working as expected.  I have just migrated to VS 2015 and SQL Server 2016.
I have set the .net framework to 4.6 and corrected the References within the project to the newest versions.  This would be Microsoft.SqlServer.Types (13.0) the old one was version 10.0.  The forms that utilize the tables with the HierarchyID data types fail with the datareader.getfieldtype error.  
So just for sanity I removed the version 13.0 assembly from the references and copied the older version 10 from another machine and added that one in as a reference where I had copied it (C: root directory).  And the application worked as expected.  Unfortunately, I don't want to have an older version of an assembly if I can avoid it.  Additionally, with the old version the deployment fails with an error of looking for the new version of the assembly.  
I have looked through many forums from VB to VS to SqlServer and although it seems folks have had similar problems, it does not appear there is a definitive answer to why the most current version of the Microsoft.SqlServer.Types is not functioning in the same manner as the version 10.
Any help would be greatly appreciated.
0
This code works on my local machine, but not the server.

Dim Odrive As System.IO.DriveInfo
Odrive = My.Computer.FileSystem.GetDriveInfo("H:\")

The code is enclosed in a try catch block, but I still get an unhandled error exception "Input string not in the correct format".  Here is the stack information.  

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

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToInt32(String value)
   at DiskRoom.Form1.Form1_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at …
0
When I disassemble my assembly code with gdb, the two pointers that point to the data section 0x1000 up are with the .text section. However there are these two: strheq and andeq in front of it.  Will the two addresses be loaded into the memory or will there be some other instructions?

Thanks

Ze
0

Assembly

1K

Solutions

1

Articles & Videos

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.

Top Experts In
Assembly
<
Monthly
>