summaryrefslogtreecommitdiff
path: root/boot/old.asm
blob: a7a1b2462ed9a786a088f822e4df65dd874797d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;read data from disk
;mov bx,0x9000		;destination(es:bx)
;mov dh,1		;number of sectors
;mov dl,[BOOT_DRIVE]	;source disk
;call disk_load

;print data loaded form disk
;mov dx,[0x9000]
;call print_hex

;mov dx,[0x9000+256]
;call print_hex

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;; COM1 infinite loop ;;;;;
;
;    COM1_PORT equ 0xD000
;    mov dx,COM1_PORT
;    mov ecx,160*2
;
;    ; loop and write all data other than 0x0
;    com1_loop:
;
;	in ax,dx ; read port val
;	
;	cmp ax,0xffff
;	je com1_skip
;
;	cmp ax,0x0
;	je com1_skip
;
;	call print_hex_pm
;	add ecx,14
;    	pusha
;	    mov dx,ax
;	    call print_hex_pm
;	popa
;	add ecx,26
;
;	com1_skip:
;    
;	inc dx
;	;call print_hex_pm
;	cmp dx,COM1_PORT+0x300
;	jne com1_loop
;	mov dx,COM1_PORT
;	mov ecx,160*2
;	jmp com1_loop
;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;