Forum Graph100

Forum Graph100

Vous n'êtes pas identifié.

Annonce

Bonjour et bienvenue sur le nouveau Forum Graph100 !
L'intégralité des données a été transférée sur un forum PunBB et tout les comptes sont fonctionnels avec le même nom d'utilisateur et mot de passe.
Un wiki est aussi disponible avec le même compte ! N'oubliez pas de remettre votre avatar, bon surf !
Pour plus d'informations, consultez ce post.

#26 27 Dec 2004 05:31:43

Julien
C++iste convaincu
Lieu: Waterloo (Be)
Date d'inscription: 29 May 2002
Messages: 1456
Site web

Re: écrire dans le coin inférieur bas... sans scrolling

Ou alors y'a qu'a modifier cette routine la dans la mémoire:

Code:

; Subroutine at C000:2BB9
; Display the character in AL
; and advance the cursor to next position.
; If the first bit (MSB) of BL is on, then
; the old char on screen is first cleared; if the
; second bit is on, the color of the new char
; will be inverted.
; 
; If AL = F6h, the current font will be the set at
; CED0:0000 for the next displayed char
; else if AL = F7h, the font will be the set at
; CF50:0000.
; 
; Inputs: AL, BL
; Outputs: /
; 
; 

sub_C2BB9       proc near
    cmp     word ptr ds:0C4h, 0CE50h ; 0040:00C4 = segment of
                            ; the current character font
    jnz     loc_C2BD7       ; if the current font is already
                            ; not the normal set, then jump
    cmp     al, 0F6h ; '÷'
    jnz     loc_C2BCC
    mov     word ptr ds:0C4h, 0CED0h ; set the current font as the one
                            ; saved at CED0:0000
    retn                    ; and quit
; ---------------------------------------------------------------------------

loc_C2BCC:                              ; CODE XREF: sub_C2BB9+Aj
    cmp     al, 0F7h ; '¸'
    jnz     loc_C2BD7
    mov     word ptr ds:0C4h, 0CF50h ; set the current font as the one
                            ; saved at CF50:0000
    retn                    ; and quit
; ---------------------------------------------------------------------------

loc_C2BD7:                              ; CODE XREF: sub_C2BB9+6j
                            ; sub_C2BB9+15j
    push    ax
    push    bx
    push    dx
    push    bp
    push    si
    push    es
    mov     bh, ds:62h      ; BH = number of the current page
    call    sub_C2F4A       ; Return in DX the position of the cursor 
                            ; in page with number BH (DH=line, DL=column)
                            ; 
                            ; Inputs: BH
                            ; Outputs: DL, DH
    cmp     word ptr ds:0C4h, 0CE50h
    jnz     loc_C2C16
    cmp     al, 8           ; if the user wanted to display the 'b' character
                            ; to move the cursor backward
    jnz     loc_C2C06
    sub     dl, 1           ; decrement the column
    jnb     loc_C2C5B
    mov     ax, ds:4Ah
    sub     al, 1
    mov     dl, al          ; if the column was zero then
                            ; go to last column of the previous line
    sub     dh, 1
    jnb     loc_C2C5B
    mov     dx, 0
    jmp     short loc_C2C5B ; save the new position and quit
; ---------------------------------------------------------------------------

loc_C2C06:                              ; CODE XREF: sub_C2BB9+35j
    cmp     al, 0FFh
    jz      loc_C2C29
    cmp     al, 0Ah         ; 'n' char
    jz      loc_C2C39
    cmp     al, 0Dh         ; 'r' char
    jnz     loc_C2C16
    xor     dl, dl          ; go to first column
    jmp     short loc_C2C5B ; save the new position and quit
; ---------------------------------------------------------------------------

loc_C2C16:                              ; CODE XREF: sub_C2BB9+31j
                            ; sub_C2BB9+57j
    mov     bp, ds:0E0h
    mov     es, bp
    mov     bp, ds:4Eh      ; display a normal char at the cursor's position
    call    sub_C2CCE       ; Replace the character at line DH and column DL
                            ; by the char with number AL.
                            ; If the first (strongest) bit of BL is on, then
                            ; the char on screen is first cleared; if the
                            ; second bit is on, the color of the new char
                            ; will be inverted.
                            ; 
                            ; Inputs: AL, BL, DL, DH
                            ; Ouputs: /
    mov     word ptr ds:0C4h, 0CE50h

loc_C2C29:                              ; CODE XREF: sub_C2BB9+4Fj
    inc     dx              ; move the cursor to next position
    xor     ax, ax
    mov     al, dl
    cmp     ax, ds:4Ah      ; test if we have reached the end of the line
    jb      loc_C2C5B       ; if no then jump
    xor     dl, dl
    call    sub_C2A92       ; Move the cursor on the video page BH
                            ; at line DH and column DL 
                            ; 
                            ; Inputs: BH, DL, DH
                            ; Outputs: /

loc_C2C39:                              ; CODE XREF: sub_C2BB9+53j
    cmp     dh, ds:84h      ; check the line of the cursor
    jl      loc_C2C59       ; jump if we had not reached the last line
    mov     bx, cx          ; if yes move the whole screen up
    xor     cx, cx
    mov     dx, ds:4Ah
    mov     dh, ds:84h
    dec     dl
    mov     al, 1
    call    sub_C2AEC       ; Move a text line up:
                            ; Copy the chars CL to DL from each line
                            ; between (CH+AL) and DH, paste it
                            ; on the lines CH to (DH-AL) and clear those
                            ; chars on lines (DH-AL) to DH.
                            ; 
                            ; Inputs: AL, CL, CH, DL, DH
                            ; Outputs: /
    call    sub_C304C       ; Get the part of the current video page that contains
                            ; the character on which the cursor will appear, then
                            ; change this char in the copy by the sprite of the cursor
                            ; The result is saved at 0040:0050.
                            ; 
                            ; Inputs: /
                            ; Outputs: new image in buffer at 0040:0050
    mov     cx, bx
    jmp     short loc_C2C5E
; ---------------------------------------------------------------------------

loc_C2C59:                              ; CODE XREF: sub_C2BB9+84j
    inc     dh              ; move the cursor to the next position

loc_C2C5B:                              ; CODE XREF: sub_C2BB9+3Aj
                            ; sub_C2BB9+46j ...
    call    sub_C2A92       ; Move the cursor on the video page BH
                            ; at line DH and column DL 
                            ; 
                            ; Inputs: BH, DL, DH
                            ; Outputs: /

loc_C2C5E:                              ; CODE XREF: sub_C2BB9+9Ej
    pop     es
    pop     si
    pop     bp
    pop     dx
    pop     bx
    pop     ax
    retn
sub_C2BB9       endp

:mrd:


Pensez à surveiller mes releases wink

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr