Author Topic: Current Assembly Language Resources  (Read 2831 times)

Raistlin

  • Member
  • ***
  • Posts: 379
Current Assembly Language Resources
« on: July 19, 2016, 04:07:27 PM »
I'am always on the lookout for free Assembly Language resources THAT ARE CURRENT AND RELEVANT.
- so could I ask we leave this thread for others to add too - hutch ? As long as no forum policies and copyright issues are involved - of-course.....

Here's my first gems I picked up from author Chris Rose:

http://www.whatsacreel.net76.net/asmtutes.html  <-- online <EDIT> now here: https://www.youtube.com/playlist?list=PL0C5C980A28FEE68D
https://www.syncfusion.com/resources/techportal/details/ebooks/assemblylanguage   <-- (requires basic free registration - site contains multiple
no cost programming ebooks - free of adds - on other interesting topics - VS studio, Direct3D, SQL, Python etc.)
« Last Edit: September 20, 2018, 10:20:00 PM by Raistlin »
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

Mikl__

  • Member
  • ****
  • Posts: 687
Re: Current Assembly Language Resources
« Reply #1 on: July 20, 2016, 09:07:34 PM »
Hi, Raistlin!
There are from 44-th to 58-th tutorials in Practical x64 Assembly and C++. Where I can watch the lessons from 1-st to 43-rd? I would like to see them in pdf and not on YouTube...

Raistlin

  • Member
  • ***
  • Posts: 379
Re: Current Assembly Language Resources
« Reply #2 on: July 21, 2016, 03:53:01 PM »
I'am frankly unsure MikL__ as how to answer your question. I'll try emailing the author.
I think the topics 1 to 25 cover mostly beginner to intermediate C++ - then 44-58 Assembly Language
integration. BTW: Did you get hold of the Assembly Language ebook, by the same author on the other link ?
 <- It covers 64 bit as-well and might contain what your'e looking for.

In the mean time - please post your'e current and relevant Assembly Language links here.
I'am as hungry for knowledge as you are.
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

Mikl__

  • Member
  • ****
  • Posts: 687
Re: Current Assembly Language Resources
« Reply #3 on: July 21, 2016, 10:45:46 PM »
Hi, Raistlin!
Yes, I downloaded an e-book, but it seemed to me that the book is not linked with the content of lessons 44-58 Assembly Language and there are names of Youtube video tutors:
  • x64 Assembly and C++ Tutorial 0: Setting Up x64 Assembly in Visual Studio Express
  • x64 Assembly and C++ Tutorial 1: Getting into x64 ASM from C++  Intro, briefly how to call x64 ASM from C++
  • x64 Assembly and C++ Tutorial 2: Integer Datatypes   Integer data types so we're all on the same page
  • x64 Assembly and C++ Tutorial 3: Intro to Registers, 8086 Register Set   Intro to Registers, the 8086
  • x64 Assembly and C++ Tutorial 4: 386 and 486 Register Sets  This one is about the 386 and 486 register sets
  • x64 Assembly and C++ Tutorial 5: x64 Register Set   Finally we get to our modern x64 register set
  • x64 Assembly and C++ Tutorial 6: Basic Instructions   We'll look at a few useful instructions today.
  • x64 Assembly and C++ Tutorial 7: Visual Studio Debugging Windows   This one is about the important debugging windows in Visual Studio 2010 Express
  • x64 Assembly and C++ Tutorial 8: Jumps, Labels and the Compare Instruction    Today we'll look at Jumps, Labels and Comparing operands.
  • x64 Assembly and C++ Tutorial 9: Passing Integers to and from C++ and Assembly    This one is how to pass integer parameters via the registers and return them in RAX
  • x64 Assembly and C++ Tutorial 10: Boolean Instructions AND, OR, XOR and NOT    Some instructions for performing boolean logic
  • x64 Assembly and C++ Tutorial 11: Pointers and the LEA Instruction    Pointers, Memory and the Load Effective Address Instruction
  • x64 Assembly and C++ Tutorial 12: Programming a Useful Algorithm Part I Planning    Planning prior to programming a small but useful algorithm to Zero an array
  • x64 Assembly and C++ Tutorial 13: Programming a Useful Algorithm Part II Coding    This is the programming of the algorithm we went through above
  • x64 Assembly and C++ Tutorial 14: The Data Segment    Intro to reserving space in the data segment
  • x64 Assembly and C++ Tutorial 15: Shift Right and Left Instrictions SHL, SHR, SAL and SAR     This one is about 4 shift instructions, SHL, SHR, SAL and SAR
  • x64 Assembly and C++ Tutorial 16: Shift Right and Left Double Precision    We'll look at the rather strange double precision shifts SHLD and SHRD
  • x64 Assembly and C++ Tutorial 17: Rotate Instructions    Some rotate instructions, ROL, ROR, RCL and RCR
  • x64 Assembly and C++ Tutorial 18: Dividing and Multiplying Integers    The Multiplication and Division instructions
  • x64 Assembly and C++ Tutorial 19: FLAGS Register, Conditional Jumps and Moves   Flags register and conditional moves and jumps
  • x64 Assembly and C++ Tutorial 20: Addressing Modes   Addressing modes from registers and immediates to SIB pointers.
  • x64 Assembly and C++ Tutorial 21: Image Processing Intro   Intro to image processing
  • x64 Assembly and C++ Tutorial 22: Image Processing C++ Frontend    This is the C++ image processing one
  • x64 Assembly and C++ Tutorial 23: C++ Adjust Brightness    This is C++ adjust brightness
  • x64 Assembly and C++ Tutorial 24: Assembly Adjust Brightness Planning     This is the Assembly version of the adjust brightness algorithm
  • x64 Assembly and C++ Tutorial 25: Assembly Adjust Brightness Coding    This is the Assembly version of the adjust brightness algorithm
  • x64 Assembly and C++ Tutorial 26: Intro to the Stack   Introduction to the stack
  • x64 Assembly and C++ Tutorial 27: Calling C++ from ASM    Calling a C++ function from ASM
  • x64 Assembly and C++ Tutorial 28: Stack Frames   Intro to the rather daunting stack frame
  • x64 Assembly and C++ Tutorial 29: Test Instruction   The test instruction is a AND but doesn't set the answer in op1
  • x64 Assembly and C++ Tutorial 30: Bit Test Instructions     Testing single bits from a bit array
  • x64 Assembly and C++ Tutorial 31: Byte Swap, Setting Flags and Bit Scanning Instructions   Many little misc. instructions
  • x64 Assembly and C++ Tutorial 32: String Instructions 1, Store String and the Repeat Prefix   Three tutorials on the string instructions
  • x64 Assembly and C++ Tutorial 33: String Instructions 2, Scan and Load Strings    Three tutorials on the string instructions
  • x64 Assembly and C++ Tutorial 34: String Instructions 3, Compare and Move Strings     Three tutorials on the string instructions
  • x64 Assembly and C++ Tutorial 35: Set Byte Instruction and the C++ Bool   This one is on the SETcc instructions which set bytes to 1 or 0 based on a condition
  • x64 Assembly and C++ Tutorial 36: Putting it all Together 1, FindMax    We will spend some time now looking at a few algorithms for practice, this one's FindMax(int*, int)
  • x64 Assembly and C++ Tutorial 37: Putting it all Together 2, The Euclidean Algorithm   This one is the Euclidean Algorithm
  • x64 Assembly and C++ Tutorial 38: Intro to Single Instruction Multiple Data   We've finally made it through most of the regular x86 instruction set, now for something completely different
  • x64 Assembly and C++ Tutorial 39: CPUID, Asking your CPU to Introduce Him/Herself   Introducing the CPUID instruction
  • x64 Assembly and C++ Tutorial 40: MMX Intro Registers, Move Instructions and EMMS    A general intro to MMX and a couple of the instructions
  • x64 Assembly and C++ Tutorial 41: MMX Addition and Subtraction    The addition and subtraction instructions in MMX
  • x64 Assembly and C++ Tutorial 42: MMX Multiplication Instructions     Multiplcation instructions in MMX
  • x64 Assembly and C++ Tutorial 43: MMX Bit Shifting      Bit shifting in MMX
  • x64 Assembly and C++ Tutorial 44: MMX Packing and Unpacking
  • x64 Assembly and C++ Tutorial 45: MMX Boolean and Comparison Instructions 1
  • x64 Assembly and C++ Tutorial 46: MMX Comparisons 2 Segue to SSE
  • x64 Assembly and C++ Tutorial 47: Intro to SSE
  • x64 Assembly and C++ Tutorial 48: SSE Data Movement and Data Alignment
  • x64 Assembly and C++ Tutorial 49: SSE Arithmetic and Dynamic Memory
  • x64 Assembly and C++ Tutorial 50: SSE Conversion Instructions
  • x64 Assembly and C++ Tutorial 51: Shuffle Instructions
  • x64 Assembly and C++ Tutorial 52: Structures
  • x64 Assembly and C++ Tutorial 53: Classes
  • x64 Assembly and C++ Tutorial 54: SSE Moving Sign Masks
  • x64 Assembly and C++ Tutorial 55: MXCSR Exception Fun
  • x64 Assembly and C++ Tutorial 56: SSE Comparisons that Set rFlags
  • x64 Assembly and C++ Tutorial 57: SSE Inserting and Extracting Instructions
  • x64 Assembly and C++ Tutorial 59: 128bpp Photo Editor Frontend Imogen
  • x64 Assembly and C++ Tutorial 60: C++ Negate 128bpp Image
  • x64 Assembly and C++ Tutorial 61: AVX Negate 128bpp Image
  • x64 Assembly and C++ Tutorial 62: Box Blur Window
  • x64 Assembly and C++ Tutorial 63 A: Double Pass Box Blur Description
  • x64 Assembly and C++ Tutorial 63 B: Box Blur C++ Coding
  • x64 Assembly and C++ Tutorial 64: Calling BoxBlurASM
  • x64 Assembly and C++ Tutorial 65: HBlur in SSE Coding
  • x64 Assembly and C++ Tutorial 67: SSE Min and Max Instructions
  • x64 Assembly MultiThreading 3: Mutexes, SpinLocks and Critical Sections
  • x64 Assembly MultiThreading 2: Race Conditions and Atomic Instructions
  • x64 Assembly MultiThreading 1: Intro and Calling CreateThread
  • x64 Assembly and C++ Tutorial 66: Error Analysis
There ara names of slides:
  • Tutorial 44: MMX Packing and Unpacking
  • Tutorial 45: MMX Boolean and Comparison Instructions 1
  • Tutorial 46: MMX Comparisons 2 Segue to SSE
  • Tutorial 47: Intro to SSE
  • Tutorial 48: SSE Data Movement and Data Alignment
  • Tutorial 49: SSE Arithmetic and Dynamic Data
  • Tutorial 50: Data Conversion Instructions
  • Tutorial 51: Shuffle Instructions
  • Tutorial 52: Structures
  • Tutorial 53: Classes
  • Tutorial 54: Moving Sign Masks
  • Tutorial 55: MXCSR Exception Fun
  • Tutorial 56: SSE Comparisons that Set rFlags
  • Tutorial 57: SSE Insertion and Extraction Instructions
  • Tutorial 58: Intro to AVX

Raistlin

  • Member
  • ***
  • Posts: 379
Re: Current Assembly Language Resources
« Reply #4 on: August 04, 2016, 03:39:53 PM »
So this one is for all the theoretical geeks - a bit old (4 years) but does cover SIMD/AVX as topic.
Interestingly, the idea that modern compilers can produce code just "as good as inline/hard-coded assembly" is proven wrong. :icon_mrgreen:
Modern compilers cannot predict "data reuse" and actually do a pretty bad job at vectorization in general (arbitrary statement).

AND SO - we inline / hard-coding assembly freaks (proven to be aliens) will always win out.

https://arxiv.org/pdf/1211.0820.pdf
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5852
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Current Assembly Language Resources
« Reply #5 on: August 09, 2016, 12:23:29 PM »
 :biggrin:

 > AND SO - we inline / hard-coding assembly freaks (proven to be aliens) will always win out.

He he.  :P
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

TWell

  • Member
  • ****
  • Posts: 748
Re: Current Assembly Language Resources
« Reply #6 on: August 09, 2016, 09:13:08 PM »
Quote
Times of the Algorithms
Routine Average Time (ms) Compared to C++
C++ 16.75 1x
ASM (Regular x86)  3.1 5.4x
MMX 1.2 13.96x
SSE 1.02 16.42x
test with 1024x768x24 BPP picture 10x in AMD
msvc 2015 -Ox
Code: [Select]
C   41 ms 100 %
Cno 144 ms 28 %
ASM 29 ms 141 %
MMX 15 ms 273 %
SSE 13 ms 315 %

What kind of results intel gives?

EDIT: AdjustBrightnessTest1msni.zip without inlining
          AdjustBrightnessTest1poc.zip Pellesc 8 version
« Last Edit: August 09, 2016, 11:34:57 PM by TWell »

jj2007

  • Member
  • *****
  • Posts: 8776
  • Assembler is fun ;-)
    • MasmBasic
Re: Current Assembly Language Resources
« Reply #7 on: August 09, 2016, 09:36:36 PM »
i5:
Code: [Select]
C   47 ms 100 %
Cno 80 ms 58 %
ASM 38 ms 123 %
MMX 4 ms 1175 %
SSE 4 ms 1175 %

P.S.: Something funny under the hood - what's in your source?
Code: [Select]
000000013FC01439  | 49 F7 F9                       | idiv r9                                     |
000000013FC0143C  | 41 8B D1                       | mov edx, r9d                                |
000000013FC0143F  | 4C 8B C0                       | mov r8, rax                                 |
000000013FC01442  | E8 21 02 00 00                 | call <adjustbrightnesstest1ms.printf>       |
000000013FC01447  | 48 8D 4D E8                    | lea rcx, qword ptr ss:[rbp-18]              |
000000013FC0144B  | FF 15 DF 0B 00 00              | call qword ptr ds:[<&QueryPerformanceCounte |
000000013FC01451  | 4D 8B F7                       | mov r14, r15                                |
000000013FC01454  | 0F 1F 40 00                    | nop dword ptr ds:[rax]                      |  <<<<<<<<<<<<<<<<
000000013FC01458  | 0F 1F 84 00 00 00 00 00        | nop dword ptr ds:[rax+rax]                  |  <<<<<<<<<<<<<<<<
000000013FC01460  | 44 8B CE                       | mov r9d, esi                                |
000000013FC01463  | 41 B8 05 00 00 00              | mov r8d, 5                                  |
000000013FC01469  | 48 8B D7                       | mov rdx, rdi                                |
000000013FC0146C  | 48 8B CB                       | mov rcx, rbx                                |
000000013FC0146F  | E8 8C FB FF FF                 | call adjustbrightnesstest1ms.13FC01000      |
000000013FC01474  | 49 83 EE 01                    | sub r14, 1                                  |
000000013FC01478  | 75 E6                          | jne adjustbrightnesstest1ms.13FC01460       |
000000013FC0147A  | 48 8D 4D 38                    | lea rcx, qword ptr ss:[rbp+38]              |
000000013FC0147E  | FF 15 AC 0B 00 00              | call qword ptr ds:[<&QueryPerformanceCounte |

Siekmanski

  • Member
  • *****
  • Posts: 1674
Re: Current Assembly Language Resources
« Reply #8 on: August 09, 2016, 11:08:30 PM »
Obvious Aligning code with long nops.....

i7:
Code: [Select]
C    34 ms 100 %
Cno  55 ms  61 %
ASM  27 ms 125 %
MMX   2 ms 1700 %
SSE   1 ms 3400 %

Nice fractal  :biggrin:
Creative coders use backward thinking techniques as a strategy.

Raistlin

  • Member
  • ***
  • Posts: 379
Re: Current Assembly Language Resources
« Reply #9 on: October 06, 2016, 04:27:49 PM »
Don't know if this is posted someplace else - but thought this was Cool...
Lots of instant "Let me check my latest crack-pot theory " programming language development platforms available besides:

https://www.tutorialspoint.com/compile_assembly_online.php

EDIT: O yes and this for emulating various processor environments: http://wiki.qemu.org/Main_Page
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

Raistlin

  • Member
  • ***
  • Posts: 379
Re: Current Assembly Language Resources
« Reply #10 on: September 19, 2018, 08:50:34 PM »
OK here's some more FREE E-book/online resources, all written (republished and edited) after at-least 2006, ASM feasibility indistinct
but these with more of a GRAPHICS programming flair
- maybe activities by Siekmanski, AW27, fearless and daydreamer on the sub-forums is rubbing off on me.... :bgrin:

Michael Abrash's Graphics Programming Black Book - by Michael Abrash - Coriolis Group Books
https://github.com/jagregory/abrash-black-book

PC Assembly Language by Paul A. Carter
http://pacman128.github.io/pcasm/

OpenGL Programming Guide
http://www.glprogramming.com/red/

Programming Vertex, Geometry, and Pixel Shaders - by Wolfgang Engel, et al - Screenshots by Alan Wake - courtesy of Remedy Entertainment
https://www.academia.edu/24772316/Programming_Vertex_Geometry_and_Pixel_Shaders_Screenshots_of_Alan_Wake_courtesy_of_Remedy_Entertainment

Pixel Shaders: An Interactive Introduction to Graphics Programming
http://pixelshaders.com/

The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics by Randima Fernando, Mark J. Kilgard
http://developer.download.nvidia.com/CgTutorial/cg_tutorial_chapter01.html

Learning Modern 3D Graphics Programming by Jason L. McKesson
http://www.cse.chalmers.se/edu/year/2017/course/TDA361/LearningModern3DGraphicsProgramming.pdf

Computer Graphics Edited by Nobuhiko Mukai
https://www.intechopen.com/books/computer-graphics

Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

daydreamer

  • Member
  • ****
  • Posts: 548
  • reach for the stars
Re: Current Assembly Language Resources
« Reply #11 on: September 27, 2018, 03:48:07 AM »
any great cross macro assembler and Resources?
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

K_F

  • Member
  • *****
  • Posts: 1404
  • Anybody out there?
Re: Current Assembly Language Resources
« Reply #12 on: September 27, 2018, 08:20:26 AM »
If I'm not mistaken IDAQ has what you're looking for, or something close to it.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'