@@ -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
0 commit comments