initial import
[staff/goc4/2018bti7061.git] / asm-5-programming / examples / sandbox / sandbox.asm
1 ;;; File sandbox.asm
2 ;;; Author: E. Benoist
3 ;;; Date: August 31, 2016
4 ;;; Compile with: make
5
6 ;;; This program is just a sandbox.
7 ;;; It does not terminate properly
8 ;;; Neither does it do anything,
9 ;;; It is used to test functions in the debugger.
10
11 section .data
12
13 section .text
14 global _start
15 _start:
16 nop
17 mov rdx, 45
18 mov rax, 7
19 mov rbx, 3
20 mul rbx
21
22 nop
23 mov rax, 23
24 div rbx
25
26 mov rax, -1
27 mov rbx, 3
28 mov rcx, -3
29 mul rbx
30
31 nop
32 mov rax, -1
33 imul rbx
34
35 nop