Skip to content

Commit 6280891

Browse files
eliminacion de copia en 60000
1 parent 8bfd55a commit 6280891

4 files changed

Lines changed: 30 additions & 27 deletions

File tree

.gdb_history

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
si
2-
dashboard memory watch 0x8000, 100
3-
dashboard memory unwatch 0x8000
4-
dashboard memory unwatch 0x8000,
5-
dashboard memory watch 0x8000 100
6-
si
7-
si
8-
continue
9-
quit
10-
dashboard memory watch 0x8000 100
111
b *0x7c23
122
continue
133
si
@@ -254,3 +244,13 @@ continue
254244
dashboard
255245
siquit
256246
quit
247+
b *0x8000
248+
continue
249+
quit
250+
b *0x8000
251+
dashboard memory watch 0x60000 20
252+
dashboard memory watch 0x8000 20
253+
continue
254+
quir
255+
qut
256+
quit

asm/bios/mbr.asm

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,35 @@ load_nextsector:
5858
cmp ax, 0
5959
jnz load_nextsector
6060

61+
mov si, msg_ok
62+
call print_string_16
63+
6164

6265
;; TO-DO reponer
6366
;;mov eax, [0x8000 + 6]
6467
;;cmp eax, "BOOT" ; Match against the tsl_start.sys binary
6568
;;jne magic_fail
6669

67-
mov ax, 0x0800 ; Segment where the bootloader and payload are loaded
68-
mov cx, 0x6000 ; Segment where the bootloader and payload will be copied
70+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; esta copia a 60000 no la quiero.
6971

70-
copy_payload_to_free_mem: ; Move bootloader and payload to 0x60000
71-
mov fs, ax ; From segment
72-
mov es, cx ; To segment
73-
mov bx, 0x0 ; Offset
72+
;;mov ax, 0x0800 ; Segment where the bootloader and payload are loaded
73+
;;mov cx, 0x6000 ; Segment where the bootloader and payload will be copied
7474

75-
copy_single_segment:
76-
mov dl, [fs:bx]
77-
mov [es:bx], dl
78-
inc bx
79-
jnz copy_single_segment
75+
;;copy_payload_to_free_mem: ; Move bootloader and payload to 0x60000
76+
;; mov fs, ax ; From segment
77+
;; mov es, cx ; To segment
78+
;; mov bx, 0x0 ; Offset
8079

81-
add ax, 0x1000
82-
add cx, 0x1000
83-
cmp cx, 0xA000 ; Last address (bootloader + payload = 256KiB total)
84-
jnz copy_payload_to_free_mem
80+
;;copy_single_segment:
81+
;; mov dl, [fs:bx]
82+
;; mov [es:bx], dl
83+
;; inc bx
84+
;; jnz copy_single_segment
85+
86+
;; add ax, 0x1000
87+
;; add cx, 0x1000
88+
;; cmp cx, 0xA000 ; Last address (bootloader + payload = 256KiB total)
89+
;; jnz copy_payload_to_free_mem
8590

8691
mov eax, 0x00
8792
mov ebx, 0x00
@@ -90,8 +95,6 @@ copy_single_segment:
9095
mov fs, ax
9196
mov es, ax
9297

93-
mov si, msg_ok
94-
call print_string_16
9598

9699
jmp 0x0000:0x8000
97100

obj/mbr.o

-112 Bytes
Binary file not shown.

out/mbr.sys

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)