Advertisement
SimonWright

Inline Assembler

May 13th, 2022
3,199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.44 KB | None | 0 0
  1. with System.Machine_Code;
  2. procedure Assembly is
  3.    --  These are Cortex-M assembly statements! You're only supposed to
  4.    --  look at the generated assembler, not to execute it.
  5.    procedure Statements with Inline_Always is
  6.    begin
  7.       System.Machine_Code.Asm_Insn'
  8.         (System.Machine_Code.Asm ("dsb", Volatile => True));
  9.    end Statements;
  10. begin
  11.    System.Machine_Code.Asm ("dsb", Volatile => True);
  12.    Statements;
  13. end Assembly;
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement