woop
woop
0AE4:0100 ;-----------------------------------------------
0AE4:0100 ; v0.2
0AE4:0100 ;
0AE4:0100 ;
0AE4:0100 ; References:
0AE4:0100 ; http://kipirvine.com/asm/debug/Debug_Tutorial.pdf
0AE4:0100 ; http://jakash3.wordpress.com/2010/02/20/file-operations-in-assembly-
language/
0AE4:0100 ;-----------------------------------------------
0AE4:0100 ;
0AE4:0103 ;
0AE4:0103 ;exit_program:
0AE4:0116 ;
0AE4:0116 ;open_for_reading:
0AE4:0122 ret
0AE4:0123 ;
0AE4:0123 ;open_for_writing:
0AE4:0130 ret
0AE4:0131 ;
0AE4:0131 ;close_file:
0AE4:0134 int 21
0AE4:0136 ret
0AE4:0137 ;
0AE4:0137 ; read(*phR,0x200,0x100)
0AE4:0137 ;read_data:
0AE4:0151 ;have_enough:
0AE4:0151 ret
0AE4:0152 ;
0AE4:0152 ;convert_to_nibble: (al)
0AE4:0164 ;convert_success:
0AE4:0164 ret
0AE4:0165 ;convert_error:
0AE4:0167 ret
0AE4:0168 ;
0AE4:0168 ;get_one_byte:
0AE4:0175 ;return_byte:
0AE4:0175 lodsb
0AE4:0176 dec bp
0AE4:0177 ret
0AE4:0178 ;
0AE4:0178 ; write(*phW,0x300,di-0x300)
0AE4:0178 ;write_data:
0AE4:0178 mov cx,di ;load dst ptr
0AE4:018A ret
0AE4:018B ;
0AE4:018B ;get_nibble_or_die_trying:
0AE4:0196 ret
0AE4:0197 ;
0AE4:0197 ;
0AE4:0197 ;================================================================
0AE4:0197 ;
0AE4:0197 ;------
0AE4:0197 ;main:
0AE4:0197 ;------
0AE4:0197 ;
0AE4:019D ;
0AE4:019D ;-----------------------------------------------
0AE4:019D ;-----------------------------------------------
0AE4:019D ;
0AE4:01A0 ;outer_loop:
0AE4:01A3 ;inner_loop:
0AE4:01A3 ;
0AE4:01A6 ;
0AE4:01A9 mul cx
0AE4:01AB push ax
0AE4:01AC ;
0AE4:01AF ;
0AE4:01AF pop dx
0AE4:01B0 or al,dh
0AE4:01B2 stosb
0AE4:01B3 ;
0AE4:01B8 ;
0AE4:01B8 ;
0AE4:01BD ;read_handle:
0AE4:01BD db 00,00
0AE4:01BF ;read_filename:
0AE4:01BF db "testfile.dat",00
0AE4:01CC ;write_handle:
0AE4:01CC db 00,00
0AE4:01CE ;write_filename:
0AE4:01CE db "testfile.out",00
0AE4:01DB ;
0AE4:01DB
-r cx
CX 0000
:0400
-n h2b.com
-w