Author Archives: te-bachi

Assembly Intel vs. AT&T Syntax / GAS vs. NASM

Differences in Intel (NASM) vs AT&T (GAS) Syntax.

Linux assemblers: A comparison of GAS and NASM, A side-by-side look at GNU Assembler (GAS) and Netwide Assembler (NASM)

NASM Vs GAS (Practical differences)
Can I use Intel syntax of x86 assembly with GCC?
Using “.intel_syntax noprefix” how can I get memory address of a label?
Which variable size to use (db, dw, dd) with x86 assembly?
What’s the difference between equ and db in NASM?
“no such instruction error” when assembling an array declaration
Difference between .equ and .word in ARM Assembly?
Why are there empty address spaces between data sections in memory (x86 / nasm)?
What does the dollar sign ($) mean in x86 assembly when calculating string lengths like “$ – label”? [duplicate]

mov si, name              
mov si, [name]
mov si, word ptr [name]
mov si, offset name

EQU defines a symbol to a given constant value: when EQU is used, the source line must contain a label. The action of EQU is to define the given label name to the value of its (only) operand. This definition is absolute, and cannot change later. So, for example,

message         db      'hello, world' 
msglen          equ     $-message

defines msglen to be the constant 12. msglen may not then be redefined later. This is not a preprocessor definition either: the value of msglen is evaluated once, using the value of $ (see section 3.5 for an explanation of $) at the point of definition, rather than being evaluated wherever it is referenced and using the value of $ at the point of reference.

Operand  Format  6811/6812example
no operand accumulator and inherent clra
<expression> direct, extended, or relative ldaa 4
#<expression> immediate ldaa #4
<expression>,R indexed with address register ldaa 4,x
<expr>,<expr> bit set or clear bset 4,#$01
<expr>,<expr>,<expr> bit test and branch brset 4,#$01,there
<expr>,R,<expr>,<expr> bit test and branch brset 4,x,#$01,there

Rust Installation on Windows

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  C:\Users\andreas\.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  C:\Users\andreas\.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  C:\Users\andreas\.cargo\bin

This path will then be added to your PATH environment variable by
modifying the HKEY_CURRENT_USER/Environment/PATH registry key.

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: x86_64-pc-windows-msvc
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: profile set to 'default'
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2022-11-03, rust version 1.65.0 (897e37553 2022-11-02)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
 27.4 MiB /  27.4 MiB (100 %)  25.2 MiB/s in  1s ETA:  0s
info: downloading component 'rustc'
 65.0 MiB /  65.0 MiB (100 %)  25.3 MiB/s in  2s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 18.9 MiB /  18.9 MiB (100 %)   1.6 MiB/s in  7s ETA:  0s
info: retrying renaming 'C:\Users\andreas\.rustup\tmp\yntkhs6c05ay_fjz_dir\rust-docs\share/doc/rust/html' to 'C:\Users\andreas\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/doc/rust/html'
info: installing component 'rust-std'
 27.4 MiB /  27.4 MiB (100 %)  10.3 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 65.0 MiB /  65.0 MiB (100 %)  13.2 MiB/s in  5s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'

  stable-x86_64-pc-windows-msvc installed - rustc 1.65.0 (897e37553 2022-11-02)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%\.cargo\bin).

Press the Enter key to continue.