mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-06-13 12:54:24 +00:00
Merge de280976ae
into ce8e050d24
This commit is contained in:
commit
e5a6681b85
@ -19,7 +19,7 @@ and see which ones work and why.
|
|||||||
First, we will define the X as data, with a label:
|
First, we will define the X as data, with a label:
|
||||||
```nasm
|
```nasm
|
||||||
the_secret:
|
the_secret:
|
||||||
db "X"
|
db 'X'
|
||||||
```
|
```
|
||||||
|
|
||||||
Then we will try to access `the_secret` in many different ways:
|
Then we will try to access `the_secret` in many different ways:
|
||||||
|
@ -44,7 +44,7 @@ jmp $ ; infinite loop
|
|||||||
the_secret:
|
the_secret:
|
||||||
; ASCII code 0x58 ('X') is stored just before the zero-padding.
|
; ASCII code 0x58 ('X') is stored just before the zero-padding.
|
||||||
; On this code that is at byte 0x2d (check it out using 'xxd file.bin')
|
; On this code that is at byte 0x2d (check it out using 'xxd file.bin')
|
||||||
db "X"
|
db 'X'
|
||||||
|
|
||||||
; zero padding and magic bios number
|
; zero padding and magic bios number
|
||||||
times 510-($-$$) db 0
|
times 510-($-$$) db 0
|
||||||
|
@ -40,7 +40,7 @@ jmp $ ; infinite loop
|
|||||||
the_secret:
|
the_secret:
|
||||||
; ASCII code 0x58 ('X') is stored just before the zero-padding.
|
; ASCII code 0x58 ('X') is stored just before the zero-padding.
|
||||||
; On this code that is at byte 0x2d (check it out using 'xxd file.bin')
|
; On this code that is at byte 0x2d (check it out using 'xxd file.bin')
|
||||||
db "X"
|
db 'X'
|
||||||
|
|
||||||
; zero padding and magic bios number
|
; zero padding and magic bios number
|
||||||
times 510-($-$$) db 0
|
times 510-($-$$) db 0
|
||||||
|
Loading…
Reference in New Issue
Block a user