🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.programming
2 messages
2 total messages Started by Filip Ruszkowski Fri, 01 Mar 1996 00:00
Assembler-podstawy...
#412
Author: Filip Ruszkowski
Date: Fri, 01 Mar 1996 00:00
31 lines
870 bytes
Czesc wam wszystkim,

mamtaki problem zeprzy czyms takim:

model tiny
data
dane SEGMENT
  msg1 DB 'TEST$'
dane ENDS
assume ds:dane

code
org 100h

start:
  lea dx,msg1
  mov ah,09h
  int 21h
  ...
end start

wydawalo mi sie ze ds:dx powinien wskazy wac na msg1, a jednak nie!
Wiem ze mogl bym napisac:

mov dx,@data

ale tego juz nie skompiluje do .com-a
W ogole jestemm dosyc zielony z assemblera to moze wam to pytanie sie 
wydawac glupie...

                                              Z gory dzieki, Filip
Re: Assembler-podstawy...
#413
Author: rG... Ryszard Glab
Date: Fri, 01 Mar 1996 00:00
25 lines
1020 bytes
In article <4h7gcd$2...@bnet.fuw.edu.pl>,
 Filip Ruszkowski <fili...@pol.pl> wrote:

>code
>org 100h

>start:
>  lea dx,msg1
>  mov ah,09h
>  int 21h
>  ...
>end start

  W modelu TINY segmenty DS, SS i CS maja te sama wartosc czyli
najprostszym rozwiazaniem jest:

start:
	push	cs
	pop	ds

i dalej juz bez problemow.
Poza tym nie jest potrzebne deklarowanie nazwy segmentu jesli uzyles
dyrektywy .DATA (i tak segment danych moze byc tylko jeden)
----------------------=-----------------------=-----------------------
r(ycho)GLAB           |  rg...@maloka.waw.pl  |         Warsaw, Poland
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads