Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Worksheet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le10.Anh@live.uwe.ac.uk
Worksheet
Commits
114fd809
Commit
114fd809
authored
3 months ago
by
Le10.Anh@live.uwe.ac.uk
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
18890751
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Worksheet2/source/loader.asm
+16
-0
16 additions, 0 deletions
Worksheet2/source/loader.asm
with
16 additions
and
0 deletions
Worksheet2/source/loader.asm
0 → 100644
+
16
−
0
View file @
114fd809
global
loader
; Entry point label for ELF
MAGIC_NUMBER
equ
0x1BADB002
; Define the magic number constant
FLAGS
equ
0x0
; Multiboot flags
CHECKSUM
equ
-
MAGIC_NUMBER
; Calculate the checksum
section
.text
; Start of the text (code) section
align
4
; Code must be aligned to 4 bytes
dd
MAGIC_NUMBER
; Write the magic number into machine code
dd
FLAGS
; Write the flags
dd
CH
ECKSUM
; Write the checksum
loader:
; Loader label (defined as the entry point in the linker script)
mov
eax
,
0xCAFEBABE
; Set the value 0xCAFEBABE into the EAX register
.loop:
jmp
.loop
; Infinite loop
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment