English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 May 2009, 06:30   #1
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 35
Posts: 1,395
RawDoFmt() in Assembly

AC-Tech volume 1 Number 3
Using RawDoFmt in Assembly

Can some one please scan in a copy of that page please? Or some workable code, I've been looking on google groups and most of the stuff seems to be a _sprintf routine from exec.library/RawDoFmt

Thanks in advance
redblade is offline  
Old 15 May 2009, 12:05   #2
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,900
Code:
	section code,code

LVOOpenLibrary	equ	-552
LVOCloseLibrary	equ	-414
LVORawDoFmt	equ	-522
LVOPutStr	equ	-948

start:
	movem.l	d1-d7/a0-a6,-(sp)

	move.l	4.w,a6
	move.l	a6,SysBase

	lea	dosname,a1
	moveq.l	#36,d0
	jsr	LVOOpenLibrary(a6)
	move.l	d0,DOSBase
	beq	nodos

	lea	text,a0
	lea	args1,a1
	lea	putchproc,a2
	lea	buffer,a3
	jsr	LVORawDoFmt(a6)

	move.l	a3,d1
	move.l	DOSBase,a6
	jsr	LVOPutStr(a6)

	lea	text,a0
	lea	args2,a1
	lea	putchproc,a2
	lea	buffer,a3
	move.l	SysBase,a6
	jsr	LVORawDoFmt(a6)

	move.l	a3,d1
	move.l	DOSBase,a6
	jsr	LVOPutStr(a6)

	move.l	DOSBase,a1
	move.l	SysBase,a6
	jsr	LVOCloseLibrary(a6)

nodos:
	movem.l	(sp)+,d1-d7/a0-a6
	moveq.l	#0,d0
	rts

putchproc:
	move.b	d0,(a3)+
	rts

	section data,data

dosname:	dc.b	"dos.library",0

text:	dc.b	"A %s has %d %s.",$a,0

dog:	dc.b	"dog",0

legs:	dc.b	"legs",0

bird:	dc.b	"bird",0

wings:	dc.b	"wings",0

args1:	dc.l	dog
	dc.w	4
	dc.l	legs

args2:	dc.l	bird
	dc.w	2
	dc.l	wings

SysBase:	ds.l	1
DOSBase:	ds.l	1

buffer:	ds.b	80
thomas is offline  
Old 16 May 2009, 16:29   #3
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 35
Posts: 1,395
Thanks thomas.

Great OS ASm skills you got there
redblade is offline  
Old 21 May 2009, 15:33   #4
Wepl
Moderator
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 691
I don't get the point to use RawDoFmt when DOS >= 36 is available???
If you have Kick 2+ you can use any of *Printf functions (e.g. VPrintf).
Wepl is offline  
Old 29 May 2009, 17:33   #5
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 35
Posts: 1,395
I want to use Kick1.3
redblade is offline  
Old 30 May 2009, 22:50   #6
Wepl
Moderator
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 691
then you have to replace PutStr with Output and Write because PutStr in not available in 1.3
for 1.3 RawDoFmt is ok because there is no other way to do printf like stuff there without extra libs
Wepl is offline  
Old 02 June 2009, 15:25   #7
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 35
Posts: 1,395
wepl: yep already done, did that a week ago. I have to upload a whole bunch of source, it's not the best but some one else may like to laugh at it
redblade is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly reference bobster Coders. Tutorials 1 21 March 2013 00:16
Assembly and bsdsocket_lib.i fuzzylogic Coders. General 2 29 February 2012 15:45
A1200 and assembly language aricz Coders. General 16 08 February 2011 13:31
Converting assembly to C absence Coders. General 34 26 June 2010 10:17
assembly TV L8-X Amiga scene 2 04 August 2002 03:36

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.07965 seconds with 14 queries