-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checkpoint solutions (9.2, 13.1)
- Loading branch information
1 parent
f4b6331
commit f9ce701
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
assume cs:code | ||
data segment | ||
db 'Light and Wings',0 | ||
data ends | ||
|
||
code segment | ||
start: call setjpn | ||
mov ax,data | ||
mov ds,ax | ||
mov si,0 | ||
mov ax,0b800h | ||
mov es,ax | ||
mov di,12*160 | ||
s: cmp byte ptr [si],0 | ||
je ok | ||
mov al,[si] | ||
mov es:[di],al | ||
inc si | ||
add di,2 | ||
mov bx,offset s-offset ok | ||
int 7ch | ||
ok: mov ax,4c00h | ||
int 21h | ||
; Set up jpn | ||
setjpn:mov ax,cs | ||
mov ds,ax | ||
mov si,offset jpn | ||
mov ax,0 | ||
mov es,ax | ||
mov di,200h | ||
mov cx,offset jpnend-offset jpn | ||
cld | ||
rep movsb | ||
mov ax,0 | ||
mov es,ax | ||
mov word ptr es:[7ch*4],200h | ||
mov word ptr es:[7ch*4+2],0 | ||
ret | ||
jpn:push bp | ||
mov bp,sp | ||
add [bp+2],bx | ||
pop bp | ||
iret | ||
jpnend:nop | ||
code ends | ||
end start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
assume cs:code | ||
data segment | ||
dd 1,2,3,4 | ||
data ends | ||
|
||
code segment | ||
start: mov ax,2000H | ||
mov ds,ax | ||
mov bx,0 | ||
s: mov cl,0 | ||
mov ch,[bx] | ||
jcxz ok | ||
inc bx | ||
jmp short s | ||
ok: mov dx,bx | ||
mov ax,4c00h | ||
int 21h | ||
code ends | ||
end start |